Skip to main content
Question

Reader character encoding problems in oracle layers with where parameters

  • May 4, 2020
  • 6 replies
  • 102 views

Hello,

I am trying to read and oracle layer with -where- condition but i have problem because it failed with reading of character Ë or Ç.

I get this error:

ORA-01756: quoted string not properly terminated'

If i replace Ë with E, it is ok.Find below part of the error log.

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

david_r
Celebrity
  • May 4, 2020

Did you try prefixing the string literal with N as I suggested? Example

where my_field = N'KËLCYRË'
Or did that not work?

Did you try prefixing the string literal with N as I suggested? Example

where my_field = N'KËLCYRË'
Or did that not work?

No, it didn't work but i noticed that this happen if the field is a published parameter, because if i fill it directly in the where script it is ok, but if i use it as a parameter (my_field='($P1)') i get the same error.


david_r
Celebrity
  • May 4, 2020

It's most probably a problem with character encoding. My recommendation would be to use the ParameterFetcher first, then play around with the AttributeEncoder before the SQLExecutor. Possible encodings include UTF-8, the different ISO-Latin (iso-8859-x) character sets and perhaps also the Windows code pages.

It will depend on the Oracle client code page settings, column datatype, your locale settings, etc.


mark2atsafe
Safer
Forum|alt.badge.img+59

According to the information I can find, FME does allow international/unicode characters in WHERE clauses. So it should work.

I see an issue filed where a transcoding problem can occur if the char and nchar encodings are different (I see yours are from StackExchange). But I don't know if that would cause this error or not.

The fact that it fails with an unbalanced query (no closing quote) worries me that this is something new. I suggest that you visit safe.com/support and file a new support case. You should mention that it could be related to FMEENGINE-10146 - and then someone will be able to try and resolve the issue.

It would help a lot of if can include full specifications for the data (column type, Oracle version, etc) plus the workspace you are using.


rahulsharma
Safer
Forum|alt.badge.img+10

No, it didn't work but i noticed that this happen if the field is a published parameter, because if i fill it directly in the where script it is ok, but if i use it as a parameter (my_field='($P1)') i get the same error.

Can you try including the single quotes in the publish parameter value?

WHERE my_field=N$(P1)
P1='KËLCYRË' 

Did you try prefixing the string literal with N as I suggested? Example

where my_field = N'KËLCYRË'
Or did that not work?

No,didnt work even with that.