• Post Reply Bookmark Topic Watch Topic
  • New Topic

Byte vs Character Stream

 
Mark Henryson
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When to use Byte Stream and when to use Character Stream. Is there any performance issue one over again?

These are things I knew, If someone knows more, pls feel free to add.

Byte - ASCII, Read & Write as Byte(1 byte)
Character - UNICODE (It support alphabets for other language too), Read & Write as Character(2 Byte)
 
Norm Radder
Bartender
Posts: 1526
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Character streams, what you read and what get depends on the encoding.
Common encoding on Windows machines is 8859_1 which is sort of like ASCII ie one byte translates to one char. So you read a byte and the encoder outputs a character (2 bytes). The reverse on output.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!