Problems with EURO symbol in a data flat file

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Problems with EURO symbol in a data flat file
# 1  
Old 09-18-2013
Problems with EURO symbol in a data flat file

Hi,
I'm creating a flat file with various deimiters in Linux RHEL. the content for the flat file will be extracted from an oracle database. delimiters also stored in a seperate table in oracle databasae. when i use extended ASCII characters like cedilla or EURO (€) symbols, the actual character is not writiing in file.

for excample when i use cedilla (ç) as delimiter for the flat file, it is writing cedila as "c" in file where as when i use EURO symbol it is writing as ? in file.


en_US.UTF-8 is character set defined in OS where as in database it is "WE8ISO8859P15"

Please help me
# 2  
Old 09-18-2013
Did you try the iconv or recode programs?
# 3  
Old 09-18-2013
Hi RudiC
Thanks for your reply. my intention was not to use any decode functions. why can't i use the extended ASCII characters stored in my database to write into a file with using iconv or recode.

THanks
Fakru.Y
# 4  
Old 09-18-2013
Try to set your locale to sth like en_US.ISO885915 to be able to read the flat files.

Last edited by RudiC; 09-18-2013 at 08:41 PM.. Reason: typo
# 5  
Old 09-18-2013
I tried this already, but no success.
# 6  
Old 09-18-2013
Please post a binary listing of your output file (use od or hexdump ).
# 7  
Old 09-18-2013
output of od is below:
Code:
0000000 050101 046120 042137 053114 041122 057514 042103 051077
0000020 050505 044537 037504 050122 043524 042137 052101 057501
0000040 052512 047114 042137 037524 050122 043524 042137 052101
0000060 057501 052104 051077 052120 057507 054503 057503 052512
0000100 047114 042137 037524 050122 043524 041537 041531 042137
0000120 037524 042522 057521 041523 042510 042104 045137 046125
0000140 057516 052104 051077 050505 051537 044103 042105 057504
0000160 052104 043077 042522 057521 042103 040477 042125 052111
0000200 041537 037504 041506 057516 042103 050077 047522 057503
0000220 041116 037522 040520 046522 052137 043501 047137 037515
0000240 040520 046522 046537 046125 057524 047111 037504 040520
0000260 046522 052137 050131 041537 037504 040520 046522 053137
0000300 046101 042525 052137 052130 050077 051101 057515 054124
0000320 037524 040520 046522 042137 047115 051137 043516 046537
0000340 047111 053137 046101 042525 052137 052130 050077 051101
0000360 057515 046504 057516 047122 057507 040515 057530 040526
0000400 052514 057505 054124 037524 044506 042514 047137 037515
0000420 047514 042101 052137 005123
0000430


output of hexdump is below
Code:
0000000 5041 4c50 445f 564c 4252 5f4c 4443 523f
0000010 5145 495f 3f44 5052 4754 445f 5441 5f41
0000020 554a 4e4c 445f 3f54 5052 4754 445f 5441
0000030 5f41 5444 523f 5450 5f47 5943 5f43 554a
0000040 4e4c 445f 3f54 5052 4754 435f 4359 445f
0000050 3f54 4552 5f51 4353 4548 4444 4a5f 4c55
0000060 5f4e 5444 523f 5145 535f 4843 4445 5f44
0000070 5444 463f 4552 5f51 4443 413f 4455 5449
0000080 435f 3f44 4346 5f4e 4443 503f 4f52 5f43
0000090 424e 3f52 4150 4d52 545f 4741 4e5f 3f4d
00000a0 4150 4d52 4d5f 4c55 5f54 4e49 3f44 4150
00000b0 4d52 545f 5059 435f 3f44 4150 4d52 565f
00000c0 4c41 4555 545f 5458 503f 5241 5f4d 5854
00000d0 3f54 4150 4d52 445f 4e4d 525f 474e 4d5f
00000e0 4e49 565f 4c41 4555 545f 5458 503f 5241
00000f0 5f4d 4d44 5f4e 4e52 5f47 414d 5f58 4156
0000100 554c 5f45 5854 3f54 4946 454c 4e5f 3f4d
0000110 4f4c 4441 545f 0a53
0000118


Last edited by Franklin52; 09-20-2013 at 09:39 AM.. Reason: Please use code tags for data and code samples
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting data from a flat file based on condition

Hi, I have a flaty file from which i am fetching few columns in tablular form as below code. Now i want to fetch the column 6 and 7 in below code only if it either of them is non zero.However below startement awk -F, '$6==0 && $7==0{exit 1}' ${IFILE} is not working..Not sure where is the... (36 Replies)
Discussion started by: Vivekit82
36 Replies

2. Shell Programming and Scripting

Data is available or not in a flat file generated by Oracle

Hello, please help me an the below issue. i need to check whether data is available or not in a flat file generated by oracle (sometimes sql didn't any records) to overcome this. without opening flat file. Thanks....... (1 Reply)
Discussion started by: mahesh1987
1 Replies

3. Shell Programming and Scripting

Reading XML data in a FLAT FILE

I have a requirement to read the xml file and split the files into two diffrent files in Unix shell script. Could anyone please help me out with this requirement. Sample file --------------- 0,<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Information... (3 Replies)
Discussion started by: kmanivan82
3 Replies

4. UNIX for Dummies Questions & Answers

Normalize Data and write to a flat file

All, Can anyone please help me with the below scenario. I have a Flat file of the below format. ID|Name|Level|Type|Zip|MAD|Risk|Band|Salesl|Dealer|CID|AType|CValue|LV|HV|DCode|TR|DU|NStartDate|UserRole|WFlag|EOption|PName|NActivationDate|Os|Orig|Cus|OType|ORequired|DType 03|... (10 Replies)
Discussion started by: sp999
10 Replies

5. Shell Programming and Scripting

Extracting data into flat file thru unix

Hi, I need to extract a oracle staging table to a flat file thru unix batch process.We are expecting more than 4million records in the table.I know I can do it using "UTL_FILE" .But,since "UTL_FILE" takes a lot of time I am looking for better options.Can any body suggest some better options? ... (3 Replies)
Discussion started by: Beena
3 Replies

6. Linux

Euro - Symbol with enscript

Hello List, I am new in this forum. I have a problem with enscript and I am searching for about one year for a solution: We are using enscript and ghostscript to create pdf-Documents with our Software running on linux server. To print the EURO Symbol on a fixed place I can change the... (1 Reply)
Discussion started by: stefan2907
1 Replies

7. Shell Programming and Scripting

Load data from a flat file to oracle.

I have a flat file with records like Header 123 James Williams Finance2000 124 Pete Pete HR 1500 125 PatrickHeather Engg 3000 Footer The structure is: Eno:4 characters Name:8 characters Surname : 9 characters Dept:7 characters Sal:4characters These are sample... (1 Reply)
Discussion started by: Shivdatta
1 Replies

8. Shell Programming and Scripting

inserting data into a table from a flat file

Hi, I want to insert data into a table from a flat file, the file is having around 25 columns and some 10,000 records. The columns values are seperated by a space. Thanks (1 Reply)
Discussion started by: ss_ss
1 Replies

9. UNIX for Dummies Questions & Answers

Problems with sed and flat file variables

Hello All, It has been a loooooooooooong time since I had last used sed but decided to use it for a simple task I have . My goal is to use sed to read variables from a flat file then use those same variables in order to make some subsitutions. However what I am finding is that when the... (1 Reply)
Discussion started by: icalderus
1 Replies

10. Shell Programming and Scripting

Help with Data Positioning from Columns in a flat file.

Hi All, I have used this forum many times to solve my many scripting problems. This time, I would like to seek some answers to a problem that I've been head scratching quite a bit on. My Example: I am converting a 2000-byte file into a 300-byte file this file has no delimiters and hardly any... (3 Replies)
Discussion started by: oott1
3 Replies
Login or Register to Ask a Question