<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Converting MBCS string to USC2 for Java client. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-mbcs-string-to-usc2-for-java-client/m-p/2473339#M775896</link>
    <description>Thank you for the answer.&lt;BR /&gt;&lt;BR /&gt;I have checked the installation of the machine, and detected that the parts Asian-Graphics and&lt;BR /&gt;Asian-XDEVICE are missing. I don't know if they are necessary.&lt;BR /&gt;&lt;BR /&gt;I am using ja_JP.eucJP and want to convert to UCS2.&lt;BR /&gt;&lt;BR /&gt;All converter are present and iconv(1) is working. I have no idea why my program is not working.&lt;BR /&gt;&lt;BR /&gt;Best regards &lt;BR /&gt;  Jens&lt;BR /&gt;</description>
    <pubDate>Thu, 14 Dec 2000 11:43:54 GMT</pubDate>
    <dc:creator>Jens Fauth</dc:creator>
    <dc:date>2000-12-14T11:43:54Z</dc:date>
    <item>
      <title>Converting MBCS string to USC2 for Java client.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-mbcs-string-to-usc2-for-java-client/m-p/2473337#M775894</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have the following problem:&lt;BR /&gt;&lt;BR /&gt;We have a program that is reading directories and filenames form the disk and send it to a Java client.&lt;BR /&gt;In the first version we used mbstowcs(...) to convert the string.&lt;BR /&gt;The first problem is, that the type wchar_t is 4 Bytes long. But Java wants 2 Byte wchar_t. So I truncate the upper&lt;BR /&gt;2 bytes of the wchar and generate an 2 byte wchar.&lt;BR /&gt;This works perfect for English characters. But the Java client cannot display Japanese or other characters.&lt;BR /&gt;The first question is, why did mbstowcs not convert to UCS2 or UCS4? Because the output of the Japanese characters&lt;BR /&gt;is not UCS2 or UCS4.&lt;BR /&gt;&lt;BR /&gt;To solve the problem I tried to use iconv(...). For iconv I have an real Local to UCS2 converter and need no&lt;BR /&gt;truncation of the characters. iconv_open(...) has no problems. And the conversion of the English characters&lt;BR /&gt;are working perfect. But if I try to convert an Japanese string. I get the errno (251) Function not implemented.&lt;BR /&gt;I have installed all patches that I can get.&lt;BR /&gt;Nothing solves the problem.&lt;BR /&gt;&lt;BR /&gt;I hope someone can help me.&lt;BR /&gt;&lt;BR /&gt;I have a HP Visualize Workstation C3000 with HPUX 11.0 and all available patches.&lt;BR /&gt;&lt;BR /&gt;Best regards and thanks&lt;BR /&gt;  Jens Fauth&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Dec 2000 10:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-mbcs-string-to-usc2-for-java-client/m-p/2473337#M775894</guid>
      <dc:creator>Jens Fauth</dc:creator>
      <dc:date>2000-12-13T10:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting MBCS string to USC2 for Java client.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-mbcs-string-to-usc2-for-java-client/m-p/2473338#M775895</link>
      <description>Jens,&lt;BR /&gt;&lt;BR /&gt;While ENOSYS is not specifically mentioned in the iconv(3C) manpage, this most likely indicates that you do not have the appropriate Japanese filesets installed on your system.  The Japanese (and other Asian language) filesets are not included as part of the Core OS (like the European languages); these are part of the ASE (Asian Support Environment) which is installed with product B1515AA (for series 700) or B1520AA (for series 800).  Once you install those, you should see the following products:&lt;BR /&gt;&lt;BR /&gt;    Asian-Core&lt;BR /&gt;    Asian-Graphics&lt;BR /&gt;    Asian-PRINTER&lt;BR /&gt;    Asian-TERM&lt;BR /&gt;    Asian-UTILITY&lt;BR /&gt;    Asian-X11&lt;BR /&gt;    Asian-X11FONT&lt;BR /&gt;    Asian-XDEVICE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you do already have these installed, then what locale are you trying to convert from and to?  HP supports the following Japanese character sets:&lt;BR /&gt;&lt;BR /&gt;    eucJP&lt;BR /&gt;    kana8&lt;BR /&gt;    SJIS&lt;BR /&gt;    utf8 (an encoding of ISO-10646 Unicode)&lt;BR /&gt;&lt;BR /&gt;You should see the following files in /usr/lib/nls/iconv/tables:&lt;BR /&gt;&lt;BR /&gt;    eucJP=ucs2  sjis=ucs2  utf8=ucs2&lt;BR /&gt;&lt;BR /&gt;These are the conversion tables for eucJP-&amp;gt;UCS2, SJIS-&amp;gt;UCS2, and UTF8-&amp;gt;UCS2 encodings.  &lt;BR /&gt;&lt;BR /&gt;You can also try using the "iconv" command-line program to attempt to convert one file at a time, to see if that will provide the functionality you need.&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Dec 2000 21:15:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-mbcs-string-to-usc2-for-java-client/m-p/2473338#M775895</guid>
      <dc:creator>Kenneth Platz</dc:creator>
      <dc:date>2000-12-13T21:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Converting MBCS string to USC2 for Java client.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/converting-mbcs-string-to-usc2-for-java-client/m-p/2473339#M775896</link>
      <description>Thank you for the answer.&lt;BR /&gt;&lt;BR /&gt;I have checked the installation of the machine, and detected that the parts Asian-Graphics and&lt;BR /&gt;Asian-XDEVICE are missing. I don't know if they are necessary.&lt;BR /&gt;&lt;BR /&gt;I am using ja_JP.eucJP and want to convert to UCS2.&lt;BR /&gt;&lt;BR /&gt;All converter are present and iconv(1) is working. I have no idea why my program is not working.&lt;BR /&gt;&lt;BR /&gt;Best regards &lt;BR /&gt;  Jens&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Dec 2000 11:43:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/converting-mbcs-string-to-usc2-for-java-client/m-p/2473339#M775896</guid>
      <dc:creator>Jens Fauth</dc:creator>
      <dc:date>2000-12-14T11:43:54Z</dc:date>
    </item>
  </channel>
</rss>

