Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I have a BIG5 encoded file.. and when I use the command "wc" on it, it always returns the error "Invalid or incomplete multibyte or wide character". Why does ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2003
    Posts
    12

    Invalid or incomplete multibyte or wide character


    Hi,

    I have a BIG5 encoded file.. and when I use the command "wc" on it, it always returns the error "Invalid or incomplete multibyte or wide character".

    Why does this occur?

    Thanks!
    YS

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    What is your value of $LANG?

  3. #3
    Just Joined!
    Join Date
    Mar 2003
    Posts
    12

    hi

    wow.. i think you've pin point the problem.

    LANG=en_US.UTF-8

    On a system which the "wc" command works with no problem, the "UTF-8" string is not there... shall I make LANG=en_US?

    But... why does this problem occur if UTF-8 is there?

    Regards,
    Yee Seng.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Nah, the thing is that without UTF-8, it won't use Unicode at all, so it may very well report that the file is double its real size. Or really, it will report the real size, but double the character count.
    However, I have no immediate answer for what's wrong.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •