Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
So I've got a spreadsheet with some fields containing japanese. I'd like to convert these to english.
The display of the Japanese characters in the QV application is working fine, however when I try to use the field data in a $ expansion, the characters are converted to ASCII ???? characters, not the original japanese characters.
Here is my example call to the google translate api:
//get a google api key @ http://code.google.com/apis/console
LET vGoogleAppsKey = 'pasteGoogleKeyHere';
LET vJapaneseText = '? ? ? ?';
LOAD
'$(vJapaneseText)' as JapaneseText
,@1:n as EnglishTranslated
FROM
[https://www.googleapis.com/language/translate/v2?key=$(vGoogleAppsKey)&q=$(vJapaneseText)&source=ja&target=en]
(fix)
;
Here is the log output:
12/28/2010 1:46:03 PM: 0019 LOAD
12/28/2010 1:46:03 PM: 0020 '? ? ? ?' as JapaneseText
12/28/2010 1:46:03 PM: 0021 ,@1:n as EnglishTranslated
12/28/2010 1:46:03 PM: 0022 FROM
12/28/2010 1:46:03 PM: 0023 [https://www.googleapis.com/language/translate/v2?key=keyGoesHere...&q=? ? ? ?&source=ja&target=en]
12/28/2010 1:46:03 PM: 0024 (fix)
I figured out that I needed to use the applycodepage() function to get the japanese characters to show up.
Something like applycodepage( $(vJapaneseText),932) got it to work!
I figured out that I needed to use the applycodepage() function to get the japanese characters to show up.
Something like applycodepage( $(vJapaneseText),932) got it to work!