Question

Unexpected UTF-8 Character Error in Developer Studio

  • 16 November 2021
  • 7 replies
  • 435 views

Userlevel 5
Badge +11

Hello Dear My Friends,

I am having problem with Turkish characters in developer studio. When opening the file, I get the message "The file Xyz.plsql cannot be safely opened with encoding utf-8. Do you want to continue opening it?”

When I open it, "�" character appears instead of Turkish letters. I need to fix the "�" characters one by one.
My second problem is that it shows up as a typo in red in the editor. It is what appears as a popup in the image below(Unexpected character at 441:25. Text cannot be parsed.)

 

Also, i looked at the netbeans configuration as in the link. But it didn't.

https://stackoverflow.com/questions/53257763/netbeans-9-print-unicode-characters

 

Best Regards,

Barış


This topic has been closed for comments

7 replies

Userlevel 5
Badge +12

Hi Barış,

 

The � character (Unicode FFFD) is used as a replacement when the original character cannot be parsed. Can you share the file here? Also, could you please type the correct characters here so that we can compare the UTF encoding with the correct characters.

Userlevel 5
Badge +11

Hi @Ben Monroe,

 

Since I don't know the unicode character, I wrote it as �. I've attached an example plsql file to make it more understandable, can you review it?

 

here is an example of my second question

here is an example of my second question

 

Userlevel 5
Badge +12

Hi Barış,

 

Thank you for the file. I opened it and noticed that the file encoding is ASCII. Can you please try to save the file in UTF-8? I would recommend a free and popular program called “Nodepad++”. You can change and save the encoding there. After doing this, any non-ASCII characters (such as some Turkish letters) will become corrupt. Please fix them and save again.

If you are still having trouble after doing this, please share the updated file again.

Best regards,

Ben

Userlevel 5
Badge +11

Hi Ben,

 

All files in the build need to be fixed this way. this is very tiring.

My second question is more important, do you know the answer to that? This is annoying and prevents me from reading code.

 

Best Regards,

Barış

Userlevel 5
Badge +12

Hi Barış,

 

Were you able to resolve the first issue by saving the files in UTF-8 encoding?

As for the second issue, can you please share a file that I can use to reproduce this?

 

Best regards,

Ben

Userlevel 5
Badge +11

Hi @Ben Monroe

 

You can try this in developer studio without sharing a file with you. Still, I am sharing a detailed example with a file and screenshot. You can also observe this situation in the gif in my previous answers.

 

Best Regards,

Barış

Userlevel 7
Badge +19

Non ASCII characters are not supported to write directly in code. It is described in the link below and there is also a description about how to use UNISTR function in Oracle instead:

https://docs.ifs.com/techdocs/Foundation1/050_development/040_core_server/027_base_server_dev/100_localization_internationalization/070_Unicode.htm

 

I would suggest to use Language_SYS.Translate_Constant in the example with information messages, then you can get the information text in the language of the logged on user. If you translate the constant to all used languages.