• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

URL, UTF-8

 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
I'm in a bit of a pickle and am hoping someone will set me in the right direction. The problem I'm trying to solve is in the context of a web application. The user types a character string in the browser, then we use AJAX to pass the user's string to the server, which persists the string to the DB. All pretty normal stuff. The problem arises when the user's string contains international symbols.

if the user types in "bénévoles" we call encodeURIComponent(..) to get "b%C3%A9n%C3%A9voles" ... the value that is stuffed into the AJAX request to the server. The problem is that sometimes the value received by the server is not "bénévoles" but "bénévoles" .... strange stuff! I say that the server sometimes gets that "bénévoles" value because I've only been able to reproduce the behavior on a deployed instance of our product, not on my local development machine. The most obvious delta I see between my development box (no problem) and our deployed product (user text garbled) is the the former isn't using SSL, but the latter does.

I'm thinking I'll try to introduce SSL to my development box in an effort to reproduce the problem ... but I'm wondering if I'm wasting my time. Has any one ever seen AJAX+SSL cause encoding problems (like the one I describe above)?

Any advice or suggestions are greatly welcomed.
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did eventually figure this out. And the problem had nothing to do with SSL. For anyone else who needs to solve a similar problem, the root cause for me was an uber-old application server that didn't properly decode UTF-8.
 
reply
    Bookmark Topic Watch Topic
  • New Topic