|
|
|
Re: multibyte characters to a csv file [message #436336 is a reply to message #436250] |
Tue, 22 December 2009 22:30   |
ayush_anand
Messages: 417 Registered: November 2008
|
Senior Member |
|
|
Quote:What about the classical ways to generate a csv file?
Regards
Michel
Michel,are you talking about UTL_FILE??
However I have achieved the requirement by using Oracle SQL Developer tool.
Rahul,
An example for you of multibyte characters
select 'सेन्गुप्त' from dual
|
|
|
|
Re: multibyte characters to a csv file [message #436339 is a reply to message #436336] |
Tue, 22 December 2009 22:41   |
 |
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
SQL> set colsep ","
SQL> select * from employer;
ID,NAME , SALARY, MONTH
----------,----------,----------,----------
1,Eric , 1500, 6
1,Eric , 2000, 7
1,Eric , 1800, 8
2,Steve , 2200, 7
2,Steve , 1200, 8
|
|
|
|
|
|
Re: multibyte characters to a csv file [message #436346 is a reply to message #436344] |
Tue, 22 December 2009 22:55   |
ayush_anand
Messages: 417 Registered: November 2008
|
Senior Member |
|
|
SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET'
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> SELECT USERENV ('language') FROM DUAL;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.UTF8
|
|
|
Re: multibyte characters to a csv file [message #436347 is a reply to message #436343] |
Tue, 22 December 2009 22:55   |
 |
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>BlackSwan this is Simple and nice way but don't you think so that it will increase the size of file ( if data is too big ) since this puts , comma after complete length of column not after immediate the records !!!
1) When I can buy a 1TB disk for $80 (US Dollar) I am not concerned about disk space all that much.
2) It was a Quick & Dirty example to show what could be done.
3) If you are obsessed with disk space you are free to enumerate each column_name & apply RTRIM() or LTRIM() function to each.
[Updated on: Tue, 22 December 2009 22:57] Report message to a moderator
|
|
|
Re: multibyte characters to a csv file [message #436349 is a reply to message #436347] |
Tue, 22 December 2009 23:01   |
 |
rahulvb
Messages: 924 Registered: October 2009 Location: Somewhere Near Equator.
|
Senior Member |
|
|
Quote:
1) When I can buy a 1TB disk for $80 (US Dollar) I am not concerned about disk space all that much.
you have $80 , other may not !! another thing user is trying to Create CSV file may be for further processing and not for FUN so in my opinion we should keep the output as small as possibel so further process time is reduced or become easy even for transfer the data or for Storage.
hope you are Agree with me !!
-Rahul
[Updated on: Tue, 22 December 2009 23:04] Report message to a moderator
|
|
|
|
Re: multibyte characters to a csv file [message #436355 is a reply to message #436354] |
Tue, 22 December 2009 23:59   |
 |
ramoradba
Messages: 2457 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
SQL> ALTER SESSION SET NLS_LANGUAGE='SIMPLIFIED CHINESE';
Session altered.
SQL> ALTER SESSION SET NLS_TERRITORY='CHINA';
Session altered.
SQL> select sysdate from dual;
SYSDATE
----------
23-12┐ -09
SQL> select to_char(sysdate,'Day Month yyyy','NLS_DATE_LANGUAGE = ARABIC') from dual;
TO_CHAR(SYSDATE,'DAY
--------------------
┐┐┐┐┐┐┐┐ ┐┐┐┐┐┐ 2009
SQL> select to_char(sysdate,'Day Month yyyy') from dual;
TO_CHAR(SYSDATE,
----------------
┐┐┐ 12┐ 2009
SQL> select to_char(sysdate,'Day Month yyyy','NLS_DATE_LANGUAGE = RUSSIAN') from dual;
TO_CHAR(SYSDATE,'DAYMONTH
-------------------------
┐┐┐┐┐ ┐┐┐┐┐┐┐ 2009
SQL> select to_char(sysdate,'DD Month YYYY','NLS_CALENDAR=''Arabic Hijrah''') from dual;
TO_CHAR(SYSDATE,'DDMO
---------------------
06 ┐┐┐┐ 1431
SRIRAM 
|
|
|
|
|
|
Re: multibyte characters to a csv file [message #436359 is a reply to message #436357] |
Wed, 23 December 2009 00:11   |
ayush_anand
Messages: 417 Registered: November 2008
|
Senior Member |
|
|
I found evidence to support my fact
Configuring Your Client To Be a Unicode Client on Windows:
On Windows you cannot use sqlplusw.exe or sqlplus.exe as a Unicode / UTF8 client. Using sqlplusw.exe with NLS_LANG set to AL32UTF8 is totally incorrect. There are 2 Oracle provided Unicode clients you can use on Windows: iSQL*Plus and Oracle SQL Developer. If you want to use / write a Unicode application on Windows then the application should be specifically written to use the Windows Unicode API, setting NLS_LANG to AMERICAN_AMERICA.AL32UTF8 is not enough. You should consult the application vendor or the vendor of the development environment to see how to properly code in Unicode.
The popular tool TOAD is NOT able to run against (AL32)UTF8 databases. Toad does not support databases with a Unicode character set such as UTF8 or AL16UTF16. The International version of Toad is the only version of Toad that does support (AL32)UTF8.
All Oracle 9i and up clients are compatible with a AL32UTF8 database, even if they use a non-AL32UTF8 NLS_LANG setting:
http://repettas.wordpress.com/2008/05/15/al32utf8utf8-unicode-database-character-set-implications/
|
|
|
|
|
|
|
|