0

I'm using phantomJS with selenium for automation Works flawless on my local machine (Ubuntu 12.04) However .. on server (also ubuntu 12.04 server edition) phantomjs seems to not handle unicode chars & through an exception on accessing elements containing them

Clarification:

Selecting an element on page works fine;

Accessing text / html attributes that would return sets of unicode chars. through the exception

The rest of the Server system or other python modules for example, (Python interpreter) don't seem to have that problem and they can read and manipulate unicode chars well.

phantomjs -v: 1.9.7

Any idea ?!

Thanks in Advance

Ramez Ashraf
  • 873
  • 6
  • 14
  • Is the character set on the server different from your local machine? – Richard Mar 03 '14 at 16:32
  • Thanks for the fast response! typing "locale" yield identical results between server & local machines , "locale -a" on server is missing zh_CN.utf8 , zh_SG.utf8.. it's the arabic language i'm struggling with , these looks to be for chinese language support. Do you think it's related ? Does locale command is indeed answering what you meant by the is character set are same ?! Thanks – Ramez Ashraf Mar 03 '14 at 16:52
  • I think this link might be helpful: http://stackoverflow.com/questions/6289474/working-with-utf-8-encoding-in-python-source – Richard Mar 03 '14 at 17:44
  • Thanks! the link didnt help much , In python interpreter , all works fine.. like: u = 'idzie wąż wąską dróżką' is printed on screen normally , encoding operation , no errors of what they suffer from appears to me in the interpreter... appears to be a phantomjs specific problem , which happen on the server but not on the local machine. – Ramez Ashraf Mar 03 '14 at 18:34

0 Answers0