Hi Michael and Robert,

Well I followed what was in osgText::String an in 
http://en.wikipedia.org/wiki/Utf8
It was my intent to have ASCII <-> UTF8 functions. However I agree "current codepage" 
<-> UTF8 could be nice. So...? Will we keep both?
Cheers,

--
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

Le Wed, 27 Jan 2010 20:50:23 +0100, Michael Platings <[email protected]> a 
écrit:

I don't think those functions do what you want them to 100%. On Windows
typically you'll want to convert to/from the *current code page* from/to
UTF-8. I'm unsure what the best name for the function is - ASCII is
incorrect as is ANSI - so I've gone with Microsoft's vague naming of
MultiByte.
I believe the attached files will do what you want. Note that on most
non-Windows operating systems e.g. OSX the code page will already be UTF-8
so conversion is unnecessary.


2010/1/27 Sukender <[email protected]>

Hi Robert,

Here is a tiny submission that allow the user to convert an extended 8-bit
ASCII std::string to an UTF8 std::string, and vice-versa. Why? Because of
the FBX plugin I'll submit in a few hours (I hope).

BTW, should this header be moved in osg instead of osgDB? Actually
conversion from and to ASCII/UTF8/UTF16 may be used from osgDB, osgText and
so on. Well, just my two cents.

Another remark: I saw conversions from/to UTF16 are Windows only. This may
be addressed...
Cheers,

Sukender
PVLE - Lightweight cross-platform game engine -
http://pvle.sourceforge.net/

_______________________________________________
osg-submissions mailing list
[email protected]

http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to