codepages

Has anyone used ICU with Delphi?

走远了吗. 提交于 2019-11-30 16:12:53
问题 Has anyone used the ICU ( see http://site.icu-project.org/ ) DLLs from Delphi? Specifically I'm interested in the Code Page Conversion and Collation functions. Looking at the header files it would appear that they are mostly in C++ using classes, so without having done much research yet, I would assume that it's necessary to create a simple wrapper around this that exports simple functions which can easily be imported in Delphi. Has anyone done any work for that yet? Or can anyone recommend a

Has anyone used ICU with Delphi?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 15:55:29
Has anyone used the ICU ( see http://site.icu-project.org/ ) DLLs from Delphi? Specifically I'm interested in the Code Page Conversion and Collation functions. Looking at the header files it would appear that they are mostly in C++ using classes, so without having done much research yet, I would assume that it's necessary to create a simple wrapper around this that exports simple functions which can easily be imported in Delphi. Has anyone done any work for that yet? Or can anyone recommend a different solution for Delphi that has similar extensive coverage for codepages and collation orders?

Print a list that contains Chinese characters in Python

这一生的挚爱 提交于 2019-11-29 10:53:27
My code looks like : # -*- coding: utf-8 -*- print ["asdf", "中文"] print ["中文"] print "中文" The output in the Eclipse console is very strange: ['asdf', '\xe4\xb8\xad\xe6\x96\x87'] ['\xe4\xb8\xad\xe6\x96\x87'] 中文 My first question is: why did the last line get the correct output, and the others didn't? And my second question is: how do I correct the wrong ones (to make them output real characters instead of the code that begins with "x") ? Thank you guys!! why did the last line get the correct output, and the others didn't? When you print foo , what gets printed out is str(foo) . However, if foo

Extended ASCII in C#

瘦欲@ 提交于 2019-11-29 08:47:54
I want to store some of the extended ascii characters into a dictionary for lookup but having little issue with getting the conversion. The current method I have to store these characters works for all the non-graphical looking ascii characters 0x20 to 0xAF. Current method: private static void LoadAnsiTable() { for (byte i = 0x20; i < 0xFE; i++) { AnsiLookup.Add(i, Convert.ToChar(i).ToString()); } } but the 0xAF and on does not have the ░ ▒ ▓ │ ┤╡ ╢ etc it just has these funky letters. Looking at this table http://www.asciitable.com/ for reference. This works if I manually add it, AnsiLookup

The encoding that Notepad++ just calls “ANSI”, does anyone know what to call it for Ruby?

你离开我真会死。 提交于 2019-11-29 01:09:58
I have a bunch of .txt's that Notepad++ says (in its drop-down "Encoding" menu) are "ANSI". They have German characters in them, [äöüß], which display fine in Notepad++. But they don't show up right in irb when I File.read 'this is a German text example.txt' them. So does anyone know what argument I should give Encoding.default_external= ? (I'm assuming that'd be the solution, right?) When 'utf-8' or 'cp850' , it reads the "ANSI" file with "äöüß" in it as "\xE4\xF6\xFC\xDF"... (Please don't hesitate to mention apparently "obvious" things in your answers; I'm pretty much as newbish as you can

What's the difference between an “encoding,” a “character set,” and a “code page”?

半城伤御伤魂 提交于 2019-11-28 16:43:39
I'm really trying to get better with this stuff. I'm pretty functional with internationalization concepts like this, but I need to get a better background on the theory behind it. I've read Spolsky's article , but I'm still unclear because these three terms get used interchangeably a LOT -- even in that article. I think at least two of them are talking about the same thing. I suspect a high percentage of developers flub their way through this stuff on a daily basis. I don't want to be one of those developers anymore. A ‘character set’ is just what it says: a properly-specified list of distinct

Print a list that contains Chinese characters in Python

无人久伴 提交于 2019-11-28 04:28:57
问题 My code looks like : # -*- coding: utf-8 -*- print ["asdf", "中文"] print ["中文"] print "中文" The output in the Eclipse console is very strange: ['asdf', '\xe4\xb8\xad\xe6\x96\x87'] ['\xe4\xb8\xad\xe6\x96\x87'] 中文 My first question is: why did the last line get the correct output, and the others didn't? And my second question is: how do I correct the wrong ones (to make them output real characters instead of the code that begins with "x") ? Thank you guys!! 回答1: why did the last line get the

Extended ASCII in C#

一笑奈何 提交于 2019-11-28 02:18:59
问题 I want to store some of the extended ascii characters into a dictionary for lookup but having little issue with getting the conversion. The current method I have to store these characters works for all the non-graphical looking ascii characters 0x20 to 0xAF. Current method: private static void LoadAnsiTable() { for (byte i = 0x20; i < 0xFE; i++) { AnsiLookup.Add(i, Convert.ToChar(i).ToString()); } } but the 0xAF and on does not have the ░ ▒ ▓ │ ┤╡ ╢ etc it just has these funky letters.

Can isdigit legitimately be locale dependent in C

倾然丶 夕夏残阳落幕 提交于 2019-11-28 01:48:22
In the section covering setlocale, the ANSI C standard states in a footnote that the only ctype.h functions whose behaviour is not affected by the current locale are isdigit and isxdigit. The Microsoft implementation of isdigit is locale dependent because, for example, in locales using code page 1250 isdigit only returns non-zero for characters in the range 0x30 ('0') - 0x39 ('9'), whereas in locales using code page 1252 isdigit also returns non-zero for the superscript digits 0xB2 ('²'), 0xB3 ('³') and 0xB9 ('¹'). Is Microsoft in violation of the C standard by making isdigit locale dependent?

Change CodePage in CMD permanently?

喜欢而已 提交于 2019-11-27 20:54:31
My Windows cmd CodePage is now under 65001. Since I was doing some Android stuff and need to use console log, but forget how changing it now. When using chcp 437 to change the CodePage back, it works. But if I start a new cmd window, it goes back. How to do the chcp thing to make it pernament? Mojtaba Rezaeian Here I found a better solution: Start -> Run -> regedit Go to [HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor] Add new String Value named: Autorun Change the value to 'chcp 437' Create a start up batch file that includes all the commands you want. Then edit the registry to point