Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们正在将我们的应用程序翻译成日语,并且一直在努力从 DataGrid 中获取 UTF-16 文本。我们在数据上尝试了各种 uniEncode、uniDecode 的组合,结果都是乱码。我们首先覆盖了DataGrid,所以我们可以看到datagrid中的日文是正确的。但是,当我们使用 GetDataOfLine 或 dgDataOfLine 将其拉出然后尝试对其进行解码时,它就会出现乱码。当前的想法是我们需要创建另一个处理程序,例如 GetUnicodeDataOfLine。有任何想法吗?
除非用户编辑某些内容,否则数据网格不会修改 dgData,此时由您决定获取字段编辑器的 unicodeText。如果您使用的是 dgText,但我不确定它会做什么。
编辑
uni 函数总是需要 UTF16。所以第二个参数是你在 uniEncode 中来自什么以及你想在 uniDecode 中去什么。所以 uniDecode(var,"UTF8") 获取 UTF16 数据并返回 UTF8 数据。uniEncode(var,"UTF8") 获取 UTF8 数据并返回 UTF16 数据。