I have a .NET resource which is ANSI ISO 8859-1 encoding. But when I access my reosource in code like MyResource.Resource1 it is read in some default encoding (may be Encoding.Default or something else).
I don’t see a way to specify resource encoding.
It depends on how you are getting the resource. If you are using the
GetManifestResoruceStreammethod on theAssemblyclass (if it is an embedded resource), then you are getting aStream; the encoding is left to you to decide.If you are using the
ResourceManagerclass then you should use theGetStreammethod; this will give you aStreamwhich you can then apply the desired encoding to.