> I've a weird issue that I've cannot recall ever having seen before. I'm
> passing a UTF-8 string from a PHP script to a windows commandline tool
> that then does a DB search. Certain characters get corrupted, but only
> when they appear at the end of the string.
Quick update for the archives: suffixing the word "dummy", and then
removing it in my windows commandline tool mostly fixed the problem, but
certain words with katakana long vowels still went wrong.
We couldn't track down a way to get the shell to work in UTF-8 (or we
did but it didn't help).
Eventual solution was to modify the commandline tool to take that UTF-8
string on stdin instead of as a commandline argument. A bit of a pain as
it required switching from exec() to proc_open() on the PHP side, but it
works. (There is also a proc_open flag to say to bypass CMD.EXE, which
might have also done the job; I didn't try it.)
Darren