Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

From ASCII txt file to MS SQL with UTF-8 Korean

New Here ,
Dec 12, 2006 Dec 12, 2006
I am trying to convert korean text ([Àç¹Ì] ¿·Áý ºÎÀÎÀÌ ¾Æ³»º¸´Ù ÁÁÀºÀÌÀ¯? ) which is saved in a tab delimited text file into MS SQL with UTF-8/Unicode characters ([생각] 인생을 즐길 수 있는 좋은 나이는? ).

I have tried ascii_utf8 and CF_charsetConvert 1.1 and it didn't work.

Is there any other CF tags that can do the jobs?
TOPICS
Advanced techniques
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 12, 2006 Dec 12, 2006
atomic wrote:
> I am trying to convert korean text ([���] ���� ������ �Ƴ����� ������? )
> which is saved in a tab delimited text file into MS SQL with UTF-8/Unicode
> characters ([??] ??? ?? ? ?? ?? ???? ).

what is the encoding of the text file?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 12, 2006 Dec 12, 2006
I am not very sure on the encoding for the text file but its from Masterpask, should be ascii.
In Excel, if I open the text file Excel will ask for the data type, I would choose 949:Korean and it would display the Korean characters fine but I am using CFMX 6.1 to download the txt file and read its content and write it to MS SQL.
In MS SQL, it displays the Korean characters as unreadable characters.

But if I open the text file in a browser with (with UTF-8 encoding), it displays the Korean characters as lots of question marks (????), but if I switch to Korean encoding, the Korean characters displays correctly.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 12, 2006 Dec 12, 2006
atomic wrote:
> I am not very sure on the encoding for the text file but its from Masterpask,
> should be ascii.

if it's korean it can't be ASCII has to be some kind of (maybe) windows codepage
for korean.

> using CFMX 6.1 to download the txt file and read its content and write it to MS
> SQL.

try adding the charset option to your cffile call w/i guess windows-949
encoding. then display it in your browser. check what the browser thinks the
encoding is. if its' still garbage try another encoding for cffile maybe MS949,
euc-kr, or ISO-2022-KR.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 13, 2006 Dec 13, 2006
I have tried it but im getting CFMX error when using
<cffile action = "read" file = "myPath\myPath.txt" variable = "myVar" charset = "euc-kr">

sun.io.ByteToCharEUC_KR.getIndex1()[S

Did I miss out on any ColdFusion Administration settings? Maybe JVM?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 13, 2006 Dec 13, 2006
LATEST
atomic wrote:
> I have tried it but im getting CFMX error when using
> <cffile action = "read" file = "myPath\myPath.txt" variable = "myVar" charset
> = "euc-kr">

not sure about cf6, get the charset cfc from here:

http://www.sustainablegis.com/projects/i18n/charsetTB.cfm

and see what your system supports. also try one of the others like
x-windows-949, etc.

>
> sun.io.ByteToCharEUC_KR.getIndex1()[S
>
> Did I miss out on any ColdFusion Administration settings? Maybe JVM?

no, either that JRE doesn't support EUC-KR (kind of unlikely) or the JRE isn't
the international one with the "extra" charsets (my guess). if you can update
the JRE (for cf6-7, it has to be 1.4.x family), try that. make sure you get the
server version & international one (though i think that's all they d/l these days).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources