sthubbar Posted September 17, 2010 at 04:08 AM Report Posted September 17, 2010 at 04:08 AM Can any of the more technical people help me find a program to convert =?GB2312?B?v827p2RtZjE5ODcwNDEw?= into Chinese characters? I received an export of my email contact and it looks like all the non-American characters got turned into these special type of strings. Thanks. Quote
889 Posted September 17, 2010 at 06:19 AM Report Posted September 17, 2010 at 06:19 AM Looks like a birthdate is in there. http://www.mandarintools.com/email.html Quote
roddy Posted September 17, 2010 at 06:44 AM Report Posted September 17, 2010 at 06:44 AM Stick it in there and then set your browser encoding to GB2312 and you get what I assume is the full thing. Quote
sthubbar Posted September 17, 2010 at 07:21 AM Author Report Posted September 17, 2010 at 07:21 AM 888 and Rody, Thanks. This tool does work one I implemented Rody's suggesting of changing the browser encoding to GB2312. Now, is there any way to do this for many entries? I have over 100 of such entries and some of them aren't GB2312, they are French, or other foreign language encoding. I saw Imron mention iconv in another posting. I have update cygwin and now have iconv on my PC, though aren't sure how to get it to work, or if it will even work. Thanks. Roddy, I'm continually impressed at how well run and useful this forum is. Great job. Quote
sthubbar Posted September 17, 2010 at 07:48 AM Author Report Posted September 17, 2010 at 07:48 AM I found this site which seems like almost the answer: http://stackoverflow.com/questions/271657/how-to-tell-if-a-string-is-base64-or-not =?gb2312?B?uLGxvmhlbrixsb5nLnhscw==?="=?" introduces an encoded value "gb2312" denotes the character encoding of the original value "B" denotes that B-encoding (equal to Base64) was used (the alternative is "Q", which refers to something close to quoted-printable) "?" functions as a separator "uLG..." is the actual value, encoded using the encoding specified before "?=" ends the encoded value Though when I try to use iconv to convert from base64 to gb2312 I get >iconv -f base64 -t GB2312iconv: conversion from base64 unsupported iconv: try 'iconv -l' to get the list of supported encodings Is there some other name for base64? Quote
roddy Posted September 17, 2010 at 08:00 AM Report Posted September 17, 2010 at 08:00 AM What was the original file format and how has it been exported? Quote
gato Posted September 17, 2010 at 08:27 AM Report Posted September 17, 2010 at 08:27 AM Try this. http://www.mandarintools.com/dimsum.html An off-line version of this service is now available as part of the DimSum Chinese Tools program. Quote
sthubbar Posted September 17, 2010 at 11:38 AM Author Report Posted September 17, 2010 at 11:38 AM Gato, Thanks for the suggestion. I installed the DimSum tools. I can't seem to get the encoding converter programs to make any changes to these funny codes. Quote
sthubbar Posted September 17, 2010 at 01:30 PM Author Report Posted September 17, 2010 at 01:30 PM I have made some progress. It appears that the text between =?GB2312?B? and the final ?= is just base64 encoded and if I use base64 it decodes them just fine. I put a list of these in text.txt and then ran. >for /f %i in (text.txt) do \cygwin\bin\echo.exe -e %i | \cygwin\bin\base64 -d >> output.txt && echo. >>output.txt It worked great and the output is Chinese characters that appear to be correct. Now the thing I don't understand is if it is just base64, why doesn't it work with the other encodings for example: =?BIG5?B?q7ggq7iu567n?= =?ISO-2022-JP?B?WmhvdU11TGl1GyRCPH5MWkx4GyhC?= =?ISO-8859-1?Q?Ang=E9lique_Poirier?= =?KOI8-R?B?7NHOIOnSyc7X?= When I try the same technique on these, it doesn't seem to work so smoothly. I'll keep playing around and maybe someone will really understand what is going on and can help. Thanks. Quote
Recommended Posts
Join the conversation
You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.