Sybase IQ Database Load table character set garbled

Source: Internet
Author: User
Tags sybase



Company leaders want me to lead a file to the Sybase IQ database in a table, the load table statement is as follows:


load table kyfx_ci_loc(

 city_name ‘,‘, 

 county_id

 ci_name ‘,‘,

 ci_section ‘,‘,

 ci_id ‘,‘,

 ci_longtitude_gps ‘,‘,

 ci_latitude_gps ‘,‘,

 ci_longtitude_baidu ‘,‘,

 ci_latitude_baidu 0x0a)

 using file ‘/home/sybase/baidulocations.txt‘

 quotes off

 escapes off

 go


After the guide from the client to see the discovery character set garbled, I began to see is not a file character encoding problem;



So I see the file modification file character encoding in VI


: Set Fileencoding=utf-8


Also use eNCA to convert file character encoding sets


Enca-l zh_cn File


Check the encoding of the file


Enca-l zh_cn-x UTF-8 File


Convert file encoding to "UTF-8" encoding


Enca-l zh_cn-x UTF-8 file1 file2


If you do not want to overwrite the original file



Then I look at the character encoding of the Sybase IQ server and the client



To view the database character set:


Select Db_property (' collation ')


Or


Select Db_property (' CharSet ')




To view the client character set:


Select Connection_property (' CharSet ')


learned that both the server and client character sets are Iso_1



I want to modify the client character set to cp936, so I look at the character encoding of the machine


Cat/etc/sysconfig/i18nlang= "en_US. UTF-8 "sysfont=" Latarcyrheb-sun16 "


So modify the/etc/sysconfig/i18n


Lang= "ZH_CN. UTF-8 "supported=" ZH_CN. GB2312:zh_CN:zh:en_US. Utf-8:en_us:en "


From this guide will not appear in Chinese display garbled!












Sybase IQ Database Load table character set garbled


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.