digitalmars.D.learn - Changing to UTF-8
- jicman <jicman_member pathlink.com> Mar 24 2005
- "Ben Hinkle" <ben.hinkle gmail.com> Mar 24 2005
- Manfred Hansen <manfred toppoint.de> Mar 25 2005
- J C Calvarese <jcc7 cox.net> Mar 25 2005
- Manfred Hansen <manfred toppoint.de> Mar 26 2005
- "Regan Heath" <regan netwin.co.nz> Mar 25 2005
Greetings! Ok folks, I am sorry, but I have not been able to get UTF-8 to work. So, let us imagine that I have a subrouting that returns a bunch of XML that is non-UTF-8 to a string, char[] str = GetNonUTF8Data(); How do I change str to UTF-8 data? Any help would be greatly appreciate it. thanks. jic
Mar 24 2005
How do I change str to UTF-8 data? Any help would be greatly appreciate it.
There are two options: 1) the ICU binding in mango http://dsource.org/projects/mango/ 2) the iconv binding that I can't seem to find anywhere but I remember seeing... anyone know where the iconv binding is? (ps - I wish we had an updated community links/libs page...)
Mar 24 2005
Ben Hinkle wrote:How do I change str to UTF-8 data? Any help would be greatly appreciate it.
There are two options: 1) the ICU binding in mango http://dsource.org/projects/mango/ 2) the iconv binding that I can't seem to find anywhere but I remember seeing... anyone know where the iconv binding is? (ps - I wish we had an updated community links/libs page...)
I have try to collect some links in a database. http://www.steinmole.de/d_lib You can search for iconv. Manfred
Mar 25 2005
Manfred Hansen wrote:Ben Hinkle wrote:How do I change str to UTF-8 data? Any help would be greatly appreciate it.
There are two options: 1) the ICU binding in mango http://dsource.org/projects/mango/ 2) the iconv binding that I can't seem to find anywhere but I remember seeing... anyone know where the iconv binding is? (ps - I wish we had an updated community links/libs page...)
I think I found the iconv binding: http://www.algonet.se/~afb/d/libiconv.d (from digitalmars.D/17913) And a related thread that seemed to devolve into licensing issues: digitalmars.D/13095I have try to collect some links in a database. http://www.steinmole.de/d_lib
Cool idea.You can search for iconv. Manfred
I think you meant this: http://www.steinmole.de/d_lib/start.cgi Looks good. I hope you don't mind that I added it to http://www.prowiki.org/wiki4d/wiki.cgi?MoreLinks -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Mar 25 2005
J C Calvarese wrote:Manfred Hansen wrote:Ben Hinkle wrote:How do I change str to UTF-8 data? Any help would be greatly appreciate it.
There are two options: 1) the ICU binding in mango http://dsource.org/projects/mango/ 2) the iconv binding that I can't seem to find anywhere but I remember seeing... anyone know where the iconv binding is? (ps - I wish we had an updated community links/libs page...)
I think I found the iconv binding: http://www.algonet.se/~afb/d/libiconv.d (from digitalmars.D/17913) And a related thread that seemed to devolve into licensing issues: digitalmars.D/13095I have try to collect some links in a database. http://www.steinmole.de/d_lib
Cool idea.
http://raa.ruby-lang.org/ During insert the links in the database, i was surprised how many libraries and tools there are for D.You can search for iconv. Manfred
I think you meant this: http://www.steinmole.de/d_lib/start.cgi
Yes that is OK.Looks good.
I hope you don't mind that I added it to http://www.prowiki.org/wiki4d/wiki.cgi?MoreLinks
Manfred
Mar 26 2005
On Fri, 25 Mar 2005 03:56:03 +0000 (UTC), jicman <jicman_member pathlink.com> wrote:Greetings! Ok folks, I am sorry, but I have not been able to get UTF-8 to work. So, let us imagine that I have a subrouting that returns a bunch of XML that is non-UTF-8 to a string, char[] str = GetNonUTF8Data();
Step 1, don't use char[] to store non UTF-8 data. Use byte[]. eg. byte[] raw = GetNonUTF8Data();How do I change str to UTF-8 data? Any help would be greatly appreciate it.
Step 2, find/write a routine to convert from your encoding X into UTF-8 and call it. Ben has suggested some libraries that will do it. Alternately, depending on X, it might be easy/possible to write a routine yourself. Regan
Mar 25 2005









Manfred Hansen <manfred toppoint.de> 