LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

utf-8 and WebBrowser

I need to retrieve UTF-8 text, unfortunately instead of text i see just question marks.
 
Is it possible to get from ActiveX MSHTML.DispHTMLDocument UTF-8 text?
0 Kudos
Message 1 of 4
(3,448 Views)
Hope that there is way of using OS system tools to make this task. And probably this will be the best way to look at.

But, about five years ago I was trying to do the similar decoding from UTF-8 in pure G. I don't remember the all details, but attached you'll find my  trial in LabVIEW. Two steps I remember from UTF-8 to unicode and then from unicode to ASCII. From unicode I was used a workaround for russian language characters in unicode set, so you'll find constant language code 848 found for russian language. Try to discover this constant for your language if it's not for complex asian or similar language with another unicode scripring.
This is not certified and/or fully tested code. Look at this vi's as an experimental ones I've made to quickly fiil the hole in the project flow. Play with this if you like. Hope that I found the latest vi's.

I'd not recommend digging very deep into unicode though. Complex task.

For reference ( UTF-8):
http://www.faqs.org/rfcs/rfc2279.html
Sergey
0 Kudos
Message 2 of 4
(3,436 Views)
TO: SergKr, Thanks for your Vis. I assume that IWebBrowser gives me UTF string correctly, However String control doesn't show me UTF character, just question marks. Using your vi's i can make Byte array out of my string.
How could i save it to file? I can't use any save to file vi's since LV string controls do not show me any UTF characters.
0 Kudos
Message 3 of 4
(3,426 Views)
OK, to find an answer search "Foreign languages in LabVIEW". The subject discussed earlier here:
http://forums.ni.com/ni/board/message?board.id=170&message.id=8475&query.id=31576#M8475
Sergey
0 Kudos
Message 4 of 4
(3,417 Views)