<p>I find that getting Unicode support in my cross-platform apps a real pain in the butt.</p>

<p>I need strings that can go from C code, to a database, to a Java application and into a Perl module.  Each of these use a different Unicode encodings (UTF8, UTF16) or some other code page.  The biggest thing that I need is a cross-platform way of doing conversions.</p>

<p>What kind of tools, libraries or techniques do people use to make handling these things easier?</p>

[{'answer_id': 38956, 'author': 'Sebastian Kirsche', 'author_id': 4097, 'author_profile': 'https://Stackoverflow.com/users/4097', 'pm_score': 3, 'selected': True, 'text': '<p>Have a look at this: <a href="http://www.icu-project.org/" rel="nofollow noreferrer" title="International Components for Unicode">http://www.icu-project.org/</a></p>\n'}, {'answer_id': 40801, 'author': 'Adrian Mouat', 'author_id': 4332, 'author_profile': 'https://Stackoverflow.com/users/4332', 'pm_score': 1, 'selected': False, 'text': '<p>How are you doing the cross-platform calls? Is it all called from Java? </p>\n\n<p><a href="http://java.sun.com/docs/books/tutorial/i18n/text/string.html" rel="nofollow noreferrer">http://java.sun.com/docs/books/tutorial/i18n/text/string.html</a> might be useful.</p>\n\n<p>I\'m a bit confused about exactly what you are trying to do. Is the database essentially interface between all the code? Then it should be easy - just make the DB UTF-8 and each of the clients will need to do their own conversions.</p>\n\n<p>Sounds like an interesting problem, could you share some more details?</p>\n'}, {'answer_id': 45602, 'author': 'Leon Timmermans', 'author_id': 4727, 'author_profile': 'https://Stackoverflow.com/users/4727', 'pm_score': 2, 'selected': False, 'text': '<p>Perl has <a href="http://search.cpan.org/~dankogai/Encode/Encode.pm" rel="nofollow noreferrer">Encode</a> as a standard library. It can be used to read/write any encoding you want, so that\'s not going to be a problem.</p>\n'}, {'answer_id': 765098, 'author': 'Maciej Piechotka', 'author_id': 49107, 'author_profile': 'https://Stackoverflow.com/users/49107', 'pm_score': 1, 'selected': False, 'text': '<p>Well, I guess iconv is sufficient for your needs. Iconv should be available on any POSIX system by default (those include (GNU/)Linux, *BSD, Mac OS X...). On Windows AFAIK it requires separate library but:</p>\n\n<ol>\n<li>you may just install it/bundle with your software/static compile it. (<a href="http://gnuwin32.sourceforge.net/packages/libiconv.htm" rel="nofollow noreferrer">libiconv for windows</a>). (I\'d guess I\'d recommend to bundle it).</li>\n<li>You may use some native Windows calls as special case.</li>\n</ol>\n\n<p>Of course if you are using Java it has it built-in - but I see that it may not be what you want (JNI calls are expensive).</p>\n\n<p>PS. Cannot you set perl to specific encoding?</p>\n'}]
['https://Stackoverflow.com/questions/38949', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3935/']