Encoding Error

Hi,

I received an error while the process was running, but I don’t know what caused it. I’m sure it’s not a logical error. Could you please suggest the best solution?

Error:

Error Activity:

after the Successful log message i got an error.

Thanks in Advance.

@MD_Farhan1

Can you show what the condition is ,in the if ?

Cheers

@MD_Farhan1

The character encoding is creating issue try with chrw

Or alternately go with regex replace

Cheers

@MD_Farhan1

Try this code which will check for null or empty before operation.

Not String.IsNullOrEmpty(
    Convert.ToString(
        If(IsDBNull(inputRow("goods_description")), "", inputRow("goods_description"))
    )
) AndAlso
Convert.ToString(
    If(IsDBNull(inputRow("goods_description")), "", inputRow("goods_description"))
).
    Trim().
    Replace("", "").
    Replace(Chr(160), "").
    Replace(Chr(9), "").
    ToUpper() = "CONSOLIDATION"

Hi @MD_Farhan1,

It may not be an issue with the logic you’ve implemented. Based on the error message, it appears to be related to a .NET encoding issue.

Could you search your project for “1252” or Windows-1252 and check if it’s being used anywhere? If you find any references, that’s where the issue is occuring.

Thanks!

Hi @Prashanth_D

i have only this 2. i think first file how to solve this error

Hi @MD_Farhan1,

That’s not the correct file. Please refer to the previously resolved cases below, as they address a similar issue to the one you’re facing.

If you’re still unable to resolve it after reviewing those, please share your workflow here so we can take a closer look and help you troubleshoot the issue.

Cheers!