|
Ah, but I think Wordpad (I'm sure you mean Wordpad) is specially programmed to interpret Chinese characters on a character by character basis, dynamically changing the font (internally) to display it appropriately.
Because... if you copy and paste the text from Wiki into a label control on a WinForm (even just in designer mode), you get boxes.
I've managed a last-minute workaround by implementing a "Chinese character mode" in my program which simply changes all of the necessary fonts to SimSun. Until I find a proper solution (maybe WPF will be better when I migrate to it) this will at least enable east-Asian users to use my program.
{o,o}.oO(i need something funny to say--any ideas?)
|)””’)
-”-”-
|
|
|
|
|
I mean Notepad
Neither my Vista nor Windows 2003 systems have problem displaying the Chinese text in Notepad using the Tahoma font. If your system can't do it, then your font install is messed up.
|
|
|
|
|
Interesting, I only get blocks in Notepad. I will look into this and see what I can find out, although I plan to upgrade to Vista soon so I may just wait until I do (and be sure to install the appropriate international fonts when I do).
Thanks for the help.
{o,o}.oO( I need something funny to say--any ideas? )
|)””’)
-”-”-
|
|
|
|
|
Hi,
I have an xml file having hex values in the format 0x3fa and other values..and a xml schema for it having data type hexBinary for the corresponding hex values. When I create a dataset using the xml file and the schema, all the hex values are missing when displayed but the integer and string are fine.
Does anybody have any suggestion or idea for what I could be missing.
Thanks
Sumy
|
|
|
|
|
Hex is just a representation of a number. It's no different than an integer.
What does the code look like that's outputting the XML file?
|
|
|
|
|
Hi Dave,
Yes, i understand that hex is a representation of a number.
But when I loop through the tables and column values in the dataset to print them, the hex values are not getting printed. This is only when I represent it as hexBinary in the XML Schema. But if I represent the same hex value dataType in the schema as NMTOKEN, I can see it getting printed.
Actually I want to eventually load this to the MS SQL Server database. So I have the column datatype as binary for all these hex values.
Thanks
Sumy
|
|
|
|
|
Here is an idea (C# syntax):
int.TryParse("12", NumberStyles.HexNumber);
int.TryParse("0x12", NumberStyles.HexNumber);
int.TryParse("0x12", NumberStyles.HexNumber|NumberStyles.AllowHexSpecifier);
so what I am saying is:
1. check the "0x" prefix is present
2. maybe whatever reads the XML file uses the same code that fails to accept hex specifiers.
BTW: the hex specifiers are language-dependent (0x in C#, &H in VB.NET). Wouldn't that
make XML language-dependent?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc,
Thanks for your response. But my coding is almost dynamic, I am creating my database tables with the datatypes that I have in the schema and then I am loading all the values from the xml file to the database.
I am including a small part of my code where I am just printing the values by looping through the dataset and where the hex values are getting omitted.
foreach(DataTable table in dataset.Tables)
{
Console.WriteLine("TableName = " + table.TableName);
Console.WriteLine ("{0}", "---------");
Console.WriteLine("Columns ...");
foreach(DataColumn column in table.Columns)
{
Console.Write("{0,-22}",column.ColumnName);
}
Console.WriteLine("\r\nNumber of rows = {0}", table.Rows.Count.ToString());
Console.WriteLine("Rows ...");
foreach(DataRow row in table.Rows)
{
foreach(Object value in row.ItemArray)
{
Console.Write("{0,-22}",value.ToString());
}
Console.WriteLine();
}
Console.WriteLine();
}
|
|
|
|
|
I don't see anything refering to ints or hex. Don't know what to think of it.
If you want real help, I suggest you show the code that writes the file, then
a part of the XML file showing how the hex numbers look like, then the code that
reads/shows the file.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I have included a sample schema file, xml file and my sample code.
Any help is appreciated.
XML Schema is as follows: sample.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="System">
<xs:complexType>
<xs:sequence>
<xs:element ref="SystemInfo"/>
<xs:element ref="Memory_Block"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SystemInfo">
<xs:complexType>
<xs:attribute name="SystemName" use="required" type="xs:NMTOKEN"/>
<xs:attribute name="TotalThreadAvailable" use="required" type="xs:integer"/>
<xs:attribute name="TotalSystemMemorySize" use="required" type="xs:hexBinary"/>
<xs:attribute name="ThreadAvailableMap" use="required" type="xs:hexBinary"/>
</xs:complexType>
</xs:element>
<xs:element name="Memory_Block">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Range"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Range">
<xs:complexType>
<xs:attribute name="EndAddress" use="required" type="xs:hexBinary"/>
<xs:attribute name="StartAddress" use="required" type="xs:hexBinary"/>
</xs:complexType>
</xs:element>
</xs:schema>
XML File is as follows: sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<System>
<SystemInfo SystemName="xyz" TotalThreadAvailable="8" TotalSystemMemorySize="0x0" ThreadAvailableMap="0x3030303"/>
<Memory_Block>
<Range EndAddress="0x0aaa" StartAddress="0x0"/>
<Range EndAddress="0x0bbb" StartAddress="0x0"/>
<Range EndAddress="0x0ddd" StartAddress="0x0"/>
<Range EndAddress="0x0ccc" StartAddress="0x0"/>
</Memory_Block>
</System>
My sample code:
myXmlDataDocument = new XmlDataDocument();
myStreamReader = new StreamReader("sample.xsd");
myXmlDataDocument.DataSet.ReadXmlSchemamyStreamReader);
myXmlDataDocument.Load("sample.xml");
DisplayTables(myXmlDataDocument.DataSet);
private void DisplayTables(DataSet dataset)
{
// Navigate Dataset
Console.WriteLine("\r\nContent of Tables ...");
foreach(DataTable table in dataset.Tables)
{
Console.WriteLine("TableName = " + table.TableName);
Console.WriteLine ("{0}", "---------");
Console.WriteLine("Columns ...");
foreach(DataColumn column in table.Columns)
{
Console.Write("{0,-22}",column.ColumnName);
}
Console.WriteLine("\r\nNumber of rows = {0}", table.Rows.Count.ToString());
Console.WriteLine("Rows ...");
foreach(DataRow row in table.Rows)
{
foreach(Object value in row.ItemArray)
{
Console.Write("{0,-22}",value.ToString());
}
Console.WriteLine();
}
Console.WriteLine();
}
}
-- modified at 11:10 Tuesday 16th October, 2007
|
|
|
|
|
When showing HTML or XML, it is necessary to check the "ignore HTML tags" checkbox,
otherwise everything gets eaten by the HTML interpreter...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Yes, I did that by modifying the mail.Should I resubmit it?
|
|
|
|
|
Hi,
this document[^] seems to tell us hex values should not include a prefix ("0x").
So I suggest you:
1. try it with an edited file (all 0x removed)
2. if that works, find a way to get that file generated correctly.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
what is the latest version of .net to use
abhi
|
|
|
|
|
The latest released version is .NET 3.0, but the .NET 3.5 release should be out by the end of the year and is currently in public Beta.
|
|
|
|
|
Strictly Scott is correct, but unfortunately the ".NET" name is overloaded. ".NET 3.0" does not include any updates to the Common Language Runtime (the core execution engine), the Base Class Library, Windows Forms, ADO.NET or ASP.NET, which remain unchanged from their .NET 2.0 versions. The only parts that are new are Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), InfoCard and Windows Workflow Foundation (abbreviated WF).
.NET Framework 3.5 will also be 'pure extensions' to .NET 2.0 but will require .NET Framework 2.0 SP1 to be installed, which will ship at the same time. I'm not completely sure how this will work out, whether System.dll will be replaced or not.
So the answer is, if you're targetting Windows Forms or ASP.NET, you need .NET Framework 2.0, but if you're using WPF, WCF, InfoCard or Workflow, you need 3.0 as well.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
i want to create web server that have video(realtime)
and i dont know that how to do.
i saw msn can display video(realtime) from client to client.
you can help me
|
|
|
|
|
You have to set up a streaming video server on your web server. It's a specialized server designed to, well, stream video efficiently.
Look up video servers on Google. It's been awhile, but there were a few good open source ones, and many more proprietary (but superior) ones.
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
I am trying to put common configuration settings for 4 applications in a common configuration file.
I have used the
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<linkedConfiguration href="file://E:\Projects\ABC\SOURCE\ABC_SOLUTION\common.config"/>
</assemblyBinding>
in all 4 app.config files so that the settings made there are available.
From each of the application I have used
System.Configuration.ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString
to read the connection string from the common config file.
I get null. Please help.
Thanks in advance.
|
|
|
|
|
When i m Building My ASP .NET application on VS 2005 it works fine i mean it generates the DLL after compilation but ..while compiling the asp .NEt solution file using nant builder it wont generates the required DLL ...
Can anyone will tell me how to run ASP .NET application using NANT script.
Ihave nant-0.85 and web deployement project installed on my PC......
But I dont know how to compile asp net sln file in nant using ASPNET_compiler.exe
I m using the following command in nant builder that doesnt work:
exec program="${dotnet}/aspnet_compiler.exe"
commandline=" -v /abcd.sln -p E:\slnabcd c:\tk1"
aaa
|
|
|
|
|
Please don't cross post. You asked this same question in the Web Development[^] forum.
|
|
|
|
|
Now i have a problem to search pdl(group) in the ldap server, i can search the pdl(group) with the following filter
string filter = "(&(objectClass=group)(displayname=" + displayname + "))"
but can only filter out with the whole display name
if i want to search with partial name, what should i do??
|
|
|
|
|
My LDAP is a little rusty, but IIRC it's:
(&(objectClass=group)(displayName=SomeNa*))
|
|
|
|
|
|
-- modified at 8:59 Thursday 11th October, 2007
i want to create web server that have video(realtime)
and i dont know that how to do.
i saw msn can display video(realtime) from client to client.
you can help me
|
|
|
|