string replace problem whit persian(farsi) letters

hi everybody
i use this dictionary:

اتمام بهره برداری, 0.0
درحال بهره برداری, 1.0

as a text file to replace in a row.
but when I run string replace(dictionary) but result is
درحال بهره برداری instead of درحال بهره برداری
اتمام بهره برداری instead of اتمام بهره برداری

how should I resolve this problem.

text1.txt (79 Bytes)

Hi @asgharkazemi,

that looks like an encoding problem: the encoding cannot be set to UTF-8 in the “String Replace (Dictionary)” Node. I will see to issue a ticket on that.

As a workaround for now, I hacked together this workflow:

Its not pretty, but it should work :slight_smile:

Best Lukas

2 Likes

Hi again,

I got an update from the developers: We will not update the “String Replace (Dictionary)” node and advice to use the cell replacer node instead (AP-16615). Sorry for the inconvenience!

I updated the workflow on the hub accordingly:

Like the “String Replace” node, this only allows to change the cell as a whole. Is that what you needed?

If you need to replace substrings in each cell instead, I found out this is quite the challenge - I gave it a try, see the WF on the hub. I’m curious if someone comes up with a better solution!

Best
Lukas

2 Likes

hi @LukasS
thank you very much for paying attention to my question.
it was exactly the solution.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.