5

I have a number of base64 strings that I need to concatenate to send over HTTP.

Is there a good character to use to split the strings (I'm guessing a character that is invalid inside a base64 string).

-thanks for the help

Alex KeySmith
  • 16,657
  • 11
  • 74
  • 152

1 Answers1

9

Since base64 only contains characters, digits and + and /, anything else should do - how about a space, a comma (',') or a pipe symbol ('|') ?

Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107
  • well, it could also contain '=' as padding character. But yes, I'd recommend any whitespace or comma, that way it'd be easier to visually read as well as parse. – michel-slm Mar 30 '11 at 10:30
  • Note that it's "common" to display base64 by putting a \n every 76 characters (at least on Linux). So if you want to use whitespace, you probably want to go for \n\n or something. – James Antill Mar 30 '11 at 14:46
  • I think pipe symbol would be the best option. – Sreekanth Karumanaghat May 08 '15 at 07:24