• alias_qr_rainmaker@lemmy.worldOP
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    3 days ago

    does chinese code take up less space? wait how many bytes does it take to encode a chinese character? is it just UTF-8 or is it something else

    • fibojoly@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 days ago

      UTF-16 is fine for the vast majority of Chinese characters. It has been standard since 2008 for C++ (at least for code that wants to be running on windows; Microsoft moved everything to w_string back then).
      C# uses UTF-16 natively for strings.
      Dunno about other languages