Skip to main content
Solved

Save special chars (š,č,ř,ž,ý, ...) by IFS function into database


Forum|alt.badge.img+5

Good afternoon,
I have some problem how to insert special characters via procedure into the database.

I have a simple function that takes me through a purchase order, goes through the item numbers and adjusts the description accordingly. In the Czech description there is a character "č", which then gets me wrong in the database and I don't know where I am making a mistake. 

and in IFS and database i see this 

Thanks you guys 

Best answer by SaaAvinak

Hello, 

This could be due to the character set of your database not supporting this character.
 
you can check that using below SQL staement 
SELECT value FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET';
 AL32UTF81 character set supports “č” and many more special characters.

Solution:

1: Change your character set.
2: Use Unicode characters like (UNISTR('\010D')) for “č”, but since you might be having many special characters, I would recommend the 1st solution.

 

Hope that helps 

View original
Did this topic help you find an answer to your question?

SaaAvinak
Do Gooder (Customer)
Forum|alt.badge.img+7

Hello, 

This could be due to the character set of your database not supporting this character.
 
you can check that using below SQL staement 
SELECT value FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET';
 AL32UTF81 character set supports “č” and many more special characters.

Solution:

1: Change your character set.
2: Use Unicode characters like (UNISTR('\010D')) for “č”, but since you might be having many special characters, I would recommend the 1st solution.

 

Hope that helps 


InfFilipV
Hero (Partner)
Forum|alt.badge.img+12
  • Hero (Partner)
  • July 10, 2024

Hello,
you can easily convert it using ASCIISTR function. Or I use powershell script to convert whole script (attached).

SELECT ASCIISTR('ĚŠČŘŽÝÁÍÉ=ěščřžýáíé') from dual; -- E\0160CR\017D\00DD\00C1\00CD\00C9=e\0161cr\017E\00FD\00E1\00ED\00E9
SELECT TO_CHAR(UNISTR('E\0160CR\017D\00DD\00C1\00CD\00C9=e\0161cr\017E\00FD\00E1\00ED\00E9')) FROM dual; -- EŠCRŽÝÁÍÉ=ešcržýáíé

unistr_text_ VARCHAR2(2000) := TO_CHAR(UNISTR('E\0160CR\017D\00DD\00C1\00CD\00C9=e\0161cr\017E\00FD\00E1\00ED\00E9')); -- EŠCRŽÝÁÍÉ=ešcržýáíé


Changing character set is not always possible - IFS installer just use some and it is not possible to change it.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings