cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion From UTF-8 to Windows-1252 through Web Service

0 Kudos
1,433

Hi,

We currently use the web Service function of SQL Anywhere with a Windows-1252 encoded Database (SQLA 17) and when we send a special character (like é, è, à), the Database do not convert it and add the scare character as a result in the Database. We tried from a browser and from C#, same result...

Any help is welcome.

Thanks

Here is the Message post :

POST https://iv-dev-sa17-1:444/software/Create_Notification HTTP/1.1
Authorization: Basic aXNvdmlzaW9uOmIxMGIxMGIxMA==
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Host: iv-dev-sa17-1:444
Content-Length: 202
Expect: 100-continue
Connection: Keep-Alive
date=2021-07-12&hour=13%3A50%3A40&Description=Test+9+%C3%A9%C3%A0&Site_Code=03&Other_identifier=&Process_Activity=&Unit=&Component=&Observation_Pt=&Reported_By=&Serial_Num=&Work_Shift=&Numeric1=

fvestjens
Participant
0 Kudos

Can you provide the definition of the webservice?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Here it is :

CREATE SERVICE "Create_Notification" TYPE 'JSON' SECURE ON USER "user" AS select "sf_create_notification"(:date,:hour,:description,:site_code,:other_identifier,:process_activity,:unit,:component,:observation_pt,:reported_by,:serial_num,:work_shift,:numeric1) as "Notification_ID"
  from "dummy";

fvestjens
Participant

Changing the TYPE 'JSON' to TYPE 'RAW' should do the trick

0 Kudos

Thank you Frank, we'll try it and let you know.

Problem solved.

Thank you so much Franck !