postgresql - strange character in migration from postgres to oracle (Ansi) -
i'm migrating db postgres oracle.i create csv files command:
\copy ttt 'c:\test\ttt.csv' csv delimiter ',' header encoding 'utf8' quote '"'; oracle sql loader put data in oracle tables. it's ok have in description character  wasnt in original db. encoding of db postgres utf8 , i'm on window machine. all. gian piero
before start sqlloader run
chcp 65001 set nls_lang=.al32utf8 chcp 65001sets codepage ofcmd.exeutf-8(which inherited sqlloader , sqlplus)- with
set nls_lang=.al32utf8tell oracle database "the client uses utf-8"
without these commands have situation (due defaults)
chcp 850 set nls_lang=american_america.us7ascii maybe on pc have codepage 437 instead of 850, depends whether pc u.s. or europe, see national language support (nls) api reference, column oem codepage
you can set nls_lang environment variable in pc settings or can define in registry @ hklm\software\wow6432node\oracle\key_%oracle_home_name%\nls_lang (for 32 bit), resp. hklm\software\oracle\key_%oracle_home_name%\nls_lang
you can change codepage of cmd.ext persistent, see https://stackoverflow.com/a/33475373/3027266
for details nls_lang see https://stackoverflow.com/a/33790600/3027266
Comments
Post a Comment