Code to convert Unicode files among different formats
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
Code to convert Unicode files among different formats
Have anybody developed code to convert files from UTF-16 or UTF-32 to UTF-8, and vice versa?
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
Re: Code to convert Unicode files among different formats
See wx/strconv.h and wxMBConvXXX classes in the docsdejudicibus wrote:Have anybody developed code to convert files from UTF-16 or UTF-32 to UTF-8, and vice versa?
they can't handle the BOMs in the files obvoisly, see here for the BOMs and convert accordingly -
http://www.microsoft.com/globaldev/getw ... icode.mspx
[Mostly retired moderator, still check in to clean up some stuff]
- dejudicibus
- Knows some wx things
- Posts: 32
- Joined: Mon Dec 20, 2004 10:28 am
- Location: Rome, Italy (EU)
- Contact:
Re: Code to convert Unicode files among different formats
[quote="Ryan Norton"
See wx/strconv.h and wxMBConvXXX classes in the docs
[/quote]
I know those classes, Ryan, and I use them in my application. However I am not sure I am using them in the optimal way. It is very difficult to find Unicode expertize in wxWidgets community. Probably there are few Unicode applications around. What I am looking for are File classes based on wxMBConvXXX classes managing various aspects including BOM and file format recognition.
See wx/strconv.h and wxMBConvXXX classes in the docs
[/quote]
I know those classes, Ryan, and I use them in my application. However I am not sure I am using them in the optimal way. It is very difficult to find Unicode expertize in wxWidgets community. Probably there are few Unicode applications around. What I am looking for are File classes based on wxMBConvXXX classes managing various aspects including BOM and file format recognition.
Dr. Dario de Judicibus
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Site: http://www.dejudicibus.it
Blog: http://lindipendente.splinder.com
Book: http://www.lalamanera.it
Hi there. I know this isn't wx-specific, and it is a bit enormous, but have you looked at ICU (IBM's open-source library for i18n)? There's a lot of stuff in there, and it is C++ and portable.
http://oss.software.ibm.com/icu/
Later,
SDM
http://oss.software.ibm.com/icu/
Later,
SDM