LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interpreting dual-byte (Japanese specifically) character codes from HTML?

I've got a VI that uses the Internet Toolkit to load a list of pages from the Web (one at a time) and then parses the HTML to extract elements such as the page title. It works great...except when I hit Asian-language pages.

For instance.

http://digital.ni.com/worldwide/bwcontent.nsf/web/all/576474D6E4C6F53D49256BD50029AE5D

I've got the Japanese language pack installed, so the title shows up fine in my browser (dual-byte characters display). However, when I "View Source", the title tag looks like this:

LabVIEW Visionソフトウェアが組込み式ビジョン能力を提供 - News - National Instruments

That's basically what LabVIEW is seeing as well. Any tips for converting these to dual-byte characters? Ultimately, I'm putting the information in a spreadsheet. I've got the Japanese IME installed in Excel, but that doesn't seem to help me out much.

Any ideas?

TIA,
Tim
0 Kudos
Message 1 of 3
(2,687 Views)
Hi Tim,

I think the issue is related to the fact that LabVIEW is a multi-byte program and does not support unicode. I can make a couple suggestions to see if this will help:

1. Change your system settings so that the regional settings are in Japanese. There is another discussion forum post that discusses this issue with Chinese characters that might help you out:
Discussion Forum: Can the English version of LabVIEW 7.0 support Chinese text strings?

There's also an excellent KB on the bottom of that discussing LabVIEW's multilingual support.

2. There's also this discussion forum that talks specifically about Japanese languages. You can try out Greg McKaskle's suggestion as well:
Discussion Forum: How do I get LabVIEW 5.1.1 to allow entry of Japanese text in Windows 98?

Hope this helps. Good luck.

Kileen
0 Kudos
Message 2 of 3
(2,674 Views)
Thanks for the links. My search skills could obviously use some improvement.

I added Japanese through the Regional Settings in Windows 2000, and then set the Language Toolbar to Japanese before I ran the VI. It is still returning single-byte codes for the kanji.

I found a somewhat clunky workaround, in that I have the VI generate an .htm file with an HTML table instead of simply a tab-delimited text file with my output. I can then open the output file in Internet Explorer -- the kanji characters display -- and copy and paste the table into Excel. The kanji characters are still retained at that point.

It's not ideal, but doesn't add enough time to the process to really make it worth looking for a more elegant solution.

Thanks for your help!

Tim
0 Kudos
Message 3 of 3
(2,660 Views)