General
cancel
Showing results for 
Search instead for 
Did you mean: 

invalid multi-byte character in shell

ashoka
Occasional Visitor

invalid multi-byte character in shell

Hi,
I got stuck up with an error "invalid multi-byte character" in a shell script. Basically I have changed locale to spanish utf8. I'm using HPUX 11.23. Already my machine is patched up with PHCO_36506. Do I need to install any other patches to overcome this problem.

Thanks in Advance
S. Ashok Kumar.
5 REPLIES
Dennis Handly
Acclaimed Contributor

Re: invalid multi-byte character in shell

That's the latest shell patch. Do you need more locale patches.
Also, can you attach a script that duplicates it?
Was it sh that failed or some application?
ashoka
Occasional Visitor

Re: invalid multi-byte character in shell

Dennis,

Thanks for your reply. Already that machine has Spanish locale.
Basically we have shell script, in which some binaries get appended to the end. Script will extract those binaries and use that binary for installation.
Today I found out that, when I remove the "echo" statements, script exection is success. But we want "echo" statement to log the messages to log file.
Please give suggestion, whatz going wrong?

Thanks
S. Ashok Kumar.
Peter Nikitka
Honored Contributor

Re: invalid multi-byte character in shell

Hi,

short question: Did you quote the strings?
I would try something like
echo 'actualizacià ³n'

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Dennis Handly
Acclaimed Contributor

Re: invalid multi-byte character in shell

>Basically we have shell script, in which some binaries get appended to the end.

Of the script? That's going to cause problems unless you are in the American Nerd locale, C.

>Script will extract those binaries and use that binary for installation.

You should really be using shar(1) to add them to the end.

>when I remove the "echo" statements, script execution is success.

Does it fail with just the echo but without the binaries?

Do you have an example of what fails?
ashoka
Occasional Visitor

Re: invalid multi-byte character in shell

Dennis and Peter,

Thanks for your reply. "shar" solved my issue.
Dennis thanks once again for giving this valuable suggestion.

-Ashok