Is there a way to encode and decode base64 image string that would be cross compatible for multiple language? I'm looking at .NET, Java and PHP. If not are there other work arounds?
7
-
2base64 is base64. It is the same across all languages.Oded– Oded2011-10-28 13:00:40 +00:00Commented Oct 28, 2011 at 13:00
-
@Oded: I heard that php decode does not work with C# encoding of base64 on this link stackoverflow.com/questions/257462/…Corbee– Corbee2011-10-28 13:02:29 +00:00Commented Oct 28, 2011 at 13:02
-
The link seems to discuss issues with base64 being passed through on the URL.Oded– Oded2011-10-28 13:04:59 +00:00Commented Oct 28, 2011 at 13:04
-
@Oded: Are there other ways to share images to different languages aside from base 64 string?Corbee– Corbee2011-10-28 13:10:33 +00:00Commented Oct 28, 2011 at 13:10
-
@Oded: wouldn't it be difficult if dealing with a lot of images?Corbee– Corbee2011-10-28 13:14:15 +00:00Commented Oct 28, 2011 at 13:14
|
Show 2 more comments
1 Answer
There are a few variants of base64 (basically the same, but small changes). See: http://en.wikipedia.org/wiki/Base64#Variants_summary_table
Just pick one and have them all use it.
It's easy enough to use search/replace to change the char 62 and 63 if necessary.