/etc/init.d Character Encoding Issue
Posted
by
Ryan Rosario
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Ryan Rosario
Published on 2012-04-11T21:24:53Z
Indexed on
2012/04/11
23:45 UTC
Read the original article
Hit count: 379
I have a script in /etc/init.d on an EC2 image that, on machine startup, pulls in source code via SVN, builds it, and then runs it using Ant. The source code is Java. Within this code is a call to the Weka library which writes a file to disk. On most Ubuntu AMIs, and my home machines' versions of Ubuntu, there is no issue.
The problem is that with certain versions/AMIs of Ubuntu, Unicode characters in the file are replaced with question marks ('?'). If I run the job manually on the trouble instance, Unicode is output to file correctly, but not when run from /etc/init.d.
What might be causing this problem and how can I fix it so that Unicode characters appear correctly in files written from /etc/init.d processes?
© Ask Ubuntu or respective owner