- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有套接字连接,可以从套接字获取数据。数据编码为Latin-5。
示例: //将从套接字获取数据,例如:
_xCustomerName = “879255:_:NÝYAZÝ TOROS”;
_xCustomerName.replaceAll(new RegExp(r'Ý'), 'İ');
最佳答案
指定了Latin-5字符,例如here。对我来说,这看起来像西里尔字母,所以您可能需要的是代码页1254 Windows Latin-5或ISO-8859-9/Latin-9。它们都具有土耳其语字符,在0xDD位置大写点划线I。您在后续帖子中提到的六个字符的更改与Latin-9相匹配。
从字符表,您可以构建一个转换表,每个字节在0..255范围内一个字符:
import "dart:typed_data";
// The Unicode characters of ISO-8859-9.
const _latin9Table =
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
" !\"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~\x7f"
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
"\u011e\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\u0130\u015e\xdf"
"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
"\u011f\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\u0131\u015f\xff";
String decodeLatin9(List<int> bytes) {
Uint16List charCodes = new Uint16List(bytes.length);
for (int i = 0; i < bytes.length; i++) {
charCodes[i] = _latin9Table.codeUnitAt(bytes[i]);
}
return String.fromCharCodes(charCodes);
}
dart:convert
框架中,则可能需要围绕该框架创建一个
Converter
甚至是
Encoding
。可悲的是,
package:convert
没有创建代码页转换器的简便方法。我认为应该。
关于unicode - 如何在Latin-5和Unicode代码点之间手动转换?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51148729/
Google Web字体上的某些字体支持多个“字符集”。关键是,如果我使用的Web字体仅提供“拉丁”字形,那么将页面翻译成不支持该字形的语言的用户将清楚地注意到困惑的文本。 我希望我的网络字体能够支持
我有(我相信)一个独特的情况;有点困惑。这是交易。 情况:我有一个单一语言的网站,其中所有内容(内容、链接)都使用非拉丁字符。 (西里尔文)(utf-8) 该网站旨在将全局读/说俄语的人联系起来。 问
我在数据库中有 10 个表。其中 9 个只存储 Latin-1 支持的标准 ascii 1 字节字符的数据。其中 1 个要求我存储仅受 UTF8 支持的特殊字符。我想使用相同的 MySQL 连接对象(
我想在 Windows 中从 eclipse 执行 Pig 脚本。我已关注this link 。但它不起作用。是否需要任何插件才能做到这一点?或者只有 pig.jar 就可以了? 最佳答案 试试这个,
题目地址:https://leetcode.com/problems/goat-latin/description/ 题目描述 Asentence S is given, composed of
我正在开发一个将普通单词转换为 pig 拉丁语的函数,但我无法将所有内容组合在一起;它必须适用于加州、手套和八。什么地方不正常? function translate(word) {
我正在尝试编写一个 pig 拉丁语翻译器,但我的网页一直显示未定义,并且无法从文本区域读取。 html 看起来不错,但最终用户需要输入的文本区域中的文本未正确显示。我尝试使用 .textContent
我写这封信是因为今天我遇到了一个问题,尽管到处搜索并尝试了许多不同的语句,但我无法以任何方式解决。 我有这个输入文件: 3 {(car pen house glass)} 5 {(battery ph
我有一个以前用 Latin-1 编码的文件。现在,当我打开这个文件时,我只得到原始编码。即状态行中的 -t:。文件中可能有一些非 Latin-1 字符,至少可以打开其他 Latin-1 文件。 我只想
我正在编写一个程序,它接受一个字符串,将其拆分为单词,将单词转换为 pig 拉丁语,然后返回结果字符串。我已经让它工作到一定程度了。 例如,如果我在程序中输入这些不以元音开头的单词,我会得到: pig
#include #include #include #define isvowel(v) (v=='a' || v=='e' || v=='i' || v=='o' || v=='u') in
所以我是编码的新手,我遇到了一些问题...我的程序应该要求用户输入,并且需要假设所有输入都是小写...并且需要假设没有额外的空格,并且需要假设它以句点结尾。然后该程序会将文本翻译成 pig latin
希望您一切顺利。 我对 Java 和这个网站都很陌生。虽然这可能看起来很长,但我只需要两件事的帮助,所以请帮忙,就像我说的,我对这一切都很陌生,所以越彻底越好。我必须做一个项目,我们必须将常规英语单词
我刚刚收到一个 SQL 插入脚本,但它在重复键输入时失败了: 我正在尝试插入: 1)蒙大拿 2)蒙大拿 我的表都是utf8_spanish2_ci, 谁能解释为什么会这样? 最佳答案 utf8_spa
我想编写一个函数,它将接受一个字符串并将单词转换为 Pyg 拉丁语。这意味着: 如果单词以元音开头,则在末尾添加“-way”。示例:“ant”变成“ant-way”。 如果单词以辅音簇开头,则将该辅音
所以我应该使用 stringConvertToPigLatin(string word) 函数将英语单词转换为 Pig Latin。我在网上能找到的所有答案都是使用 char[],我不允许这样做。如果
这看起来像是家庭作业,但请放心,这不是家庭作业。只是我们在 c++ 类(class)中使用的书中的一个练习,我正在尝试提前阅读指针。 书上的练习告诉我将一个句子拆分成标记,然后将它们中的每一个转换成
所以,我尝试并尝试制作这个 c++ pig 拉丁语程序,但它就是行不通。这是我的代码: int main() { string tmp = ""; char a; cout << "String: "
我最近在工作中遇到了这个问题,是关于pig flatten的。我用一个简单的例子来表达它 两个文件 ===文件1=== 1_a 2_b 4_d ===file2(制表符分隔)=== 1个 2乙 3c
在 Pig 中执行多级过滤后,我得到以下结果 - (2343433,Argentina,2015,Sci-Fi) (2343433,France,2015,Sci-Fi) (2343433,Germa
我是一名优秀的程序员,十分优秀!