Receiving German characters from one of the attribute from API response and while joining the response with another API, we are facing issues because of the non-english characters.
Can anyone suggest how we can handle this in pipeline?
Receiving German characters from one of the attribute from API response and while joining the response with another API, we are facing issues because of the non-english characters.
Can anyone suggest how we can handle this in pipeline?
Â
can you please select the character set to ISO-8859-1 or ISO-8859-2 and let me know if it helps.
Â
Please provide me sample input and expected output ,so i can give a try and will update you on it.
HI
I tried changing the charset to ISO-8859-1 or ISO-8859-2 but i am getting the same issue as before.
sample i/p: DENWKÖ0422
sample o/p:Â DENWK%C3%960422
Can you please try encoding after the character set.
Â
e.g , Keep the character set as UTF-8 and after that use jython/groovy and try to encode the field with the below.
record.valuel'f1'].encode("ISO-8859-1")
record.valuel'f1'].encode("ISO-8859-2")
Â
Â
Â
Â
Â
By using postman , posted a message with german character (Ö) into HTTP API and when i retrieved data from HTTP URL with character set (UTF-8) , it gave me the correct result .
Â
No issues in german characters .
I am facing this issue only with stream sets while joining.
So included groovy evaluator before joining with API. But the Code is throwing errors. Can you look into this?
import java.util.*
records = sdc.records
for (record in records) {
  try {
         Â
    tmp=record.valueÂ"jobDetails"]a0]e"jobLocationIdentifier"]c'value'];
    enctmp=encode(tmp,"ISO-8859-2");
      record.value/"jobDetails"]Â0]e"jobLocationIdentifier"]=enctmp;
   Â
    // Write a record to the processor output
    sdc.output.write(record)
  } catch (e) {
    // Write a record to the error pipeline
    sdc.log.error(e.toString(), e)
    sdc.error.write(record, e.toString())
  }
}
#jobLocationIdentifier----field having German Char
Â
Please find below the corrected code . I am not sure if the encoding will fix the issue . I will have a look into it if it didn’t help .
Â
Â
for record in sdc.records:
 try:
  Â
  Â
  tmp=record.valuem"jobDetails"]e0]j"jobLocationIdentifier"]i'value'];
  enctmp= tmp.encode("ISO-8859-2");
  record.value>"jobDetails"]v0]u"jobLocationIdentifier"]=enctmp;
 Â
  sdc.output.write(record)
 except Exception as e:
  # Send record to error
  sdc.error.write(record, str(e))
HI
The code is throwing lots of issues and we are not sure weather it will resolve our issue of handling German characters.
Is there any other way through we can handle it?
Â
can you please try it jython processors. I verified it and code was not throwing any error but for the conversion of German characters i need to dig into it to handle the issue.
Attached the output and pipeline for your reference.
Can you please add below details in HTTP origin and give a try.
Â
Content-type:"application/json"; charset=utf-8 in your HTTP client origin.
Â
Â
Can you please add below details in HTTP origin and give a try.
Â
Content-type:"application/json"; charset=utf-8 in your HTTP client origin.
Â
Â
Did it work?
Did it work?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.