Home » SQL & PL/SQL » SQL & PL/SQL » Unable to Create Fixed length file with records having Umlaut Charachters
Unable to Create Fixed length file with records having Umlaut Charachters [message #3213] |
Thu, 12 September 2002 09:25 |
Sankar
Messages: 10 Registered: February 2002
|
Junior Member |
|
|
Unable to Create Fixed length file with records having Umlaut Charachters
-------------------------------------------------------
Greetings!!
When we try creating Fixed file length from a database record,
that has UMLAUT character on it, we experience the following:
1) Length of that Field Shifts by 1 Char & all he other fields are also shifted because of that.
2) We experience this only for column that contains Odd number of Umlaut characters
For Ex MÜNCHEN city appends one extra space & KÖLN records are displayed properly.
We Checked following:
1) Database has UTF8 setting
2) Number of Bytes for MÜNCHEN is 7 ( Using VZISE(City))
3) We properly RPAD it to 60, but length becomes 61
If anybody has experienced similar problems, please advise.
Code Snippet from Shell script:
---------------------------
SET NEWPAGE NONE
SET SPACE 0
SET LINESIZE 1134
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET MARKUP HTML OFF
spool $TARGET_DIR/$FILENAME
SELECT RPAD(RPAD(NVL(COMP_LEGAL_NAME, ' '),100,' ') || RPAD(NVL(ADDRESS_LINE1, ' '),241,' ') || RPAD(NVL(ADDRESS_LINE2, ' '),240,' ') ||
RPAD(NVL(ADDRESS_LINE3, ' '),240,' ') || RPAD(NVL(CITY, ' '),60,' ') || RPAD(NVL(STATE, ' '),60,' ') || RPAD(NVL(COUNTRY_ID, ' '
),2,' ') ||
RPAD(NVL(POSTAL_CODE, ' '),60,' ') || RPAD(NVL(TO_CHAR(ADDRESS_ID), ' '),15,' ') || RPAD(NVL(BRANCH_COMP_VAL_FLG, ' '),1,' ') ||
RPAD(NVL(TO_CHAR(BATCH_ID), ' '), 15, ' ') || RPAD(NVL(FILLER, ' '),100,' '),1134,' ')
from GCR_EXTRN_VALID_SENT
where (STATUS_FLAG IS NULL) and COUNTRY_ID NOT IN '$V_COUNTRYID';
spool off
|
|
|
|
|
Goto Forum:
Current Time: Sat May 04 04:37:37 CDT 2024
|