Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Having trouble using multi-byte charset?  RSS feed

deva rajana
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Can someone assist me on below?
I would like to write a multi-byte string in a flat file where stipulated length is provided.
Field A = “xyz” (all are Chinese chars and each char occupies 2 bytes)

Say, space provided for field A in database is 5 bytes, and I would like to store first two chars (x and y here) and save a blank space. I don’t want to save third
Char ‘z’ since there is no sufficient space.

How can I achieve this? Any help would be highly appreciated.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!