--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.
> public override Encoding Encoding
> {
> get { return Encoding.Default; }
> }
Is this the default encoding used by Spark? If so, I'd call it a bug.
Please read the remark on
http://msdn.microsoft.com/en-us/library/system.text.encoding.default.aspx:
"Different operating systems might use different encodings as the default.
Therefore, data streamed from one operating system to another might be
translated incorrectly. To ensure that the encoded bytes are decoded
properly, your application should use a Unicode encoding, that is,
UTF8Encoding, UnicodeEncoding, or UTF32Encoding, with a preamble. Another
option is to use a higher-level protocol to ensure that the same format is
used for encoding and decoding."
Encoding.Utf8 is a much better and more sane default, imho. Either way, is
there a reason Spark doesn't use the responseEncoding setting of
web.config?
http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx
In a non-web context, using responseEncoding of course doesn't make sense
(and Encoding.Default may be better for console applications and such),
but Utf8 and responseEncoding should be the default, imho.
-Asbjørn
>> spark-dev+...@googlegroups.com<spark-dev%2Bunsu...@googlegroups.com>
I am reluctant to download a copy of Spark and make a code change just
for this problem, it is lazy but I don't want another code library to
manage. If there was a way to make the configurable that would be
great.
Cheers
Mike
Cheers
Please read the caution here:
http://msdn.microsoft.com/en-us/library/system.text.encoding.default.aspx
If you can test with Encoding.UTF8 or Encoding.Unicode and verify that it
works, it would be good for Spark to move away from Encoding.Default. The
absolute best thing for Spark to do would be to use the encoding defined
in <globalization responseEncoding="..." />. This can be read
programmatically through:
http://msdn.microsoft.com/en-us/library/system.web.configuration.globalizationsection.aspx
-Asbjørn
>> spark-dev+...@googlegroups.com<spark-dev%2Bunsu...@googlegroups.com>
To get proof of this, just do
Console.WriteLine(System.Text.Encoding.Default.CodePage) -- it will yield
"1252". Rendering text on the web in a 15 year old, ISO-incompatible,
7-bit bastard encoding is imho not such a great idea. ;)
More on Windows-1252 here: http://en.wikipedia.org/wiki/Windows-1252
-Asbjørn
>> spark-dev+...@googlegroups.com<spark-dev%2Bunsu...@googlegroups.com>
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
I'm pretty sure that UTF-8 is the default for all regions, it is at least
in Norway, which could have had ISO-8859-1 as its default wrt what
characters we "need" in addition to ASCII.
For other regions, I'd say UTF-8 makes even more sense, given their need
for a wider character space and lack of fitting old-school character
encodings. Either way, if another encoding is required, they would have to
adjust this with the responseEncoding in web.config anyway, so Spark
doesn't make this any harder than it has already been by using the same
value.
I would be very surprised if this change has any negative effects for
anyone.
-Asbjørn
>>> spark-dev+...@googlegroups.com<spark-dev%2Bunsu...@googlegroups.com>
>>> <spark-dev%2Bunsubscribe@googlegroups .com>
>>> > > > > >> > > .
>>> > > > > >> > > For more options, visit this group at
>>> > > > > >> > >http://groups.google.com/group/spark-dev?hl=en.
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> Groups "Spark View Engine Dev" group.
>>> > > To post to this group, send email to spar...@googlegroups.com.
>>> > > To unsubscribe from this group, send email to
>>> spark-dev+...@googlegroups.com<spark-dev%2Bunsu...@googlegroups.com>
>>> .
>>> > > For more options, visit this group athttp://
>>> groups.google.com/group/spark-dev?hl=en.
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> Groups "Spark View Engine Dev" group.
>>> > > To post to this group, send email to spar...@googlegroups.com.
>>> > > To unsubscribe from this group, send email to
>>> spark-dev+...@googlegroups.com<spark-dev%2Bunsu...@googlegroups.com>
>>> .
>>> > > For more options, visit this group athttp://
>>> groups.google.com/group/spark-dev?hl=en.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups
>>> "Spark View Engine Dev" group.
>>> To post to this group, send email to spar...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> spark-dev+...@googlegroups.com<spark-dev%2Bunsu...@googlegroups.com>