Albacore icon indicating copy to clipboard operation
Albacore copied to clipboard

assembly info errors with unicode / special characters

Open mxriverlynn opened this issue 14 years ago • 3 comments

from @thecodejunkie, via the google group

The next issue appears to originate from the assembly info rewriting I do.. it outputs

"D:\My Dropbox\Development\Repositories\Nancy\src\Nancy.sln" (Clean;Build targe t) (1) -> "D:\My Dropbox\Development\Repositories\Nancy\src\Nancy\Nancy.csproj" (default target) (4:16) -> (CoreCompile target) -> d:\My Dropbox\Development\Repositories\Nancy\src\SharedAssemblyInfo.cs(8,42): error CS1009: Unrecognized escape sequence [D:\My Dropbox\Development\Reposito ries\Nancy\src\Nancy\Nancy.csproj] d:\My Dropbox\Development\Repositories\Nancy\src\SharedAssemblyInfo.cs(8,56): error CS1009: Unrecognized escape sequence [D:\My Dropbox\Development\Reposito ries\Nancy\src\Nancy\Nancy.csproj]

0 Warning(s)
2 Error(s)

In the rake file I use

asm.copyright = "copyright © Andreas Håkansson and contributors"

(also tried single quotes) and in the outputted file I get

[assembly: AssemblyCopyright("copyright \251 Andreas H\345kansson and contributors")]

so it's blowing up on \251 and \345

Guessing this is more of a Ruby thing than an Albacore though... thanks!

mxriverlynn avatar Jan 13 '11 20:01 mxriverlynn

My first guess is that we might need to do this in about line 34 of assemblyinfo.rb

File.open(assemblyinfo_file, 'w:UTF-8') do |f|

If not, I need to read this (about 4 times to absorb it), which must have the answer somewhere ;-) - http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings

PandaWood avatar Jan 15 '11 04:01 PandaWood

there's now a unicode branch that is trying to solve this... but i'm not having much luck, yet.

mxriverlynn avatar Feb 26 '11 20:02 mxriverlynn

this won't be fixed in v0.2.3 because of compatibility issues with ruby 1.8.6. i've been unable to get my current changes working in ruby 1.8.6... the "w:UTF-8" option blows up. will have to look at this at a later time.

mxriverlynn avatar Mar 03 '11 02:03 mxriverlynn