Re: Character set conversion



On Tue, 02 Aug 2005 03:57:42 -0400, Adaddict wrote:

> I'm looking for an Ada package that could provide me functions to convert
> strings from one to another character set, for example from Windows to
> MSDOS or to Unicode. Does that even exist? I've been looking everywhere
> but haven't found anything.

It is not clear what you actually need.

Windows Unicode = Wide_Character in Ada. So to convert Latin-1 (=Ada
String) to UCS-2 (=Ada Wide_String) you need just To_Wide_String (from
Ada.Characters.Handling.) [ If UTF-8 encoding is what you are looking for,
see http://www.dmitry-kazakov.de/ada/strings_edit.htm ]

As for MS-DOS character set, what do you mean by that, graphical
characters? I'm not sure if they are present in Unicode. Anyway, as others
have noted, Translate might be useful for you.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: newbie problem; wierd "Hello World" MessageBox output
    ... I believe that a default project created with VS2005 will be Unicode, ... I never manually changed any of the default build settings, ... are included with the Windows Mobile 5.0 SDK, ... "Use Unicode Character Set"; however the wierd this is that now when I ...
    (microsoft.public.vstudio.general)
  • Re: RfD: XCHAR wordset (for UTF-8 and alike)
    ... > I am no expert on Windows, but AFAIK Unicode is ... Jax4th on WNT supported Unicode in 1993. ... universal character sets are not something that is in the distant ... universal-across-all-systems character SET ENCODING (with possibly some ...
    (comp.lang.forth)
  • How to use 8bit character sets?
    ... For some reason Python (on Windows) doesn't use the system's default ... character set and that's a serious problem for me. ... ASCII characters) and generally work with strings which need to be processed ... unicode and latin-1 all the time (the textfiles aren't unicode, ...
    (comp.lang.python)
  • Re: Parsing serial data
    ... or you might be mis-understanding "ANSI" ... Dick. ... I agree that Chuck's data is not Unicode, and that Unicode is never used for ... that his data is in a single-byte character set. ...
    (microsoft.public.vb.general.discussion)
  • Re: VC2005 Pro: IDE (Compiler ?) cant find Stdafx.h
    ... For new code I would obviously use UNICODE but for existing stuff ... > Use Multi-Byte Character Set ... > If you use TCHAR etc., and want your code to run on another platform, then ... > typedef char TCHAR; ...
    (microsoft.public.vc.language)