[lkml]   [2005]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [Patch] Support UTF-8 scripts
    Bernd Petrovitsch wrote:
    >>>It depends on the definition of "character". There are other standards
    >>>which define "character" as "byte".
    >>Certainly. However, you specifically talked about 'wc -c', and, in
    >>wc(1), atleast in the implementation commonly used on Linux, characters
    >>and bytes are not the same.
    > Yes, now since multi-byte character sets gets more commonly used.
    > However, I don't think you get this into the C standard. But we are now
    > far off the discussion ....

    It does indeed, so just one final clarification. wc(1) is not part
    of the C standard - ISO 9899 does not talk about command line utilities
    at all. The relevant standard is POSIX; IEEE Std 1003.1, 2004 Edition
    says, in

    Write to the standard output the number of bytes in each input file.
    Write to the standard output the number of characters in each input

    The -c option stands for "character" count, even though it counts bytes.
    This stems from the sometimes erroneous historical view that bytes and
    characters are the same size. Due to international requirements, the -m
    option (reminiscent of "multi-byte") was added to obtain actual
    character counts.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-09-19 23:43    [W:0.022 / U:2.720 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site