473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to specify the encoding for an embedded ressource

Hi,

[environment]
Visual Studio 2005
C#

[situation]
In a Class Library project, I have a file (MyScript.sql) containing T-SQL
statements.
The Build Action property of this file is set to "Embedded resource".
In this project, I have a small piece of code whose job is to read the
MyScript file and to execute each sql query.
In a Web Setup project, I have a custom action which access the previous
library.

[problem description]
One of my SQL query looks like this: INSERT INTO ... VALUES ("Mésange").
Unfortunately, once compiled, it is modified to: INSERT INTO ...
VALUES("M?sange").

[my unsuccessful tests]
In the AssemblyInfo.cs of the Library, I have tried different values for
AssemblyCulture(). For example AssemblyCulture("fr").
I have tried to save the file MyScript.sql with different encodings (like
Unicode, UTF8, ....).

[question]
How could I inform Visual Studio to build the dll with the embedded resource
and preserve it's encoding?

Thanks for your time and your answer.
Bernard Lucas
Jul 24 '06 #1
0 856

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Konrad Den Ende | last post by:
I've been looking around and i've been given some hints but i simply can't get to the bottom of it. How do i specify the character encoding for reading text froma file? -- Kindly Konrad...
3
by: Rolf Hemmerling | last post by:
Hello ! Beginner's question: Howto access .RC/.RES Ressource files with portable C++ code ( BCC,MSVC,GNU-C++, OpenWatcom) ? I just wanna access "local language strings", so that I may...
1
by: serge calderara | last post by:
Dear all, We are bulding an application whcih is multilanguage based with the help of ressources. All language ressources will belongs to the same assembly. Now the idea is that I I need to...
0
by: Jéjé | last post by:
Hi, I have a web site in ASP.NET which use a compiled ressource file for the french version. (dlls of web controls) My DLLs are in the GAC. My website use the NT authentication and/or the...
0
by: calderara serge | last post by:
Dear all, I have an application which is plan to be language dependant. I have make some testing by using ressource files which have been automatically added to my form by setting the form...
0
by: Progman | last post by:
visual studio 2005 asp.net 2 I added a ressource App_GlobalResources folder to my project. I added to the ressource folder a nice 1024x768 jpg file i set my main aspx file body background to...
0
by: Progman | last post by:
to read the ressources, I execute the following code from my screen files. Is there another shorter way of doing this? Similar to...
4
by: Bob Bedford | last post by:
Hi all, I'm trying to pass a fopen() ressource result as a parameter. $x=fopen($filename); header('location:myfile.php?ressource='.$x); but it doesn't seem to work. How to do so ?
2
by: Pieter | last post by:
Hi, I have an Excel file, saved as XML-file, which is put as an embedded ressource in my project. How can I read this Excel file using an OleDbDataAdapter? I know how to read an XML file as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.