473,441 Members | 1,751 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,441 software developers and data experts.

XSLT, document() function, filename, read non-standard/English characters (like µ)

Hi!

I am trying to load files that contain non-standard (and non-English) characters (e.g. µ), and need some help in understanding how the XSLT document() function interprets non-standard (and non-English) characters (e.g. µ).

The problem is that I can't load files with such names.

The xslt is saved and declared as UTF-8.

E.g. the xml file has an µ in its name.

This
Expand|Select|Wrap|Line Numbers
  1. <xsl:value-of select="'µ.xml'"/>
Shows the file name as a string correctly.


This however
Expand|Select|Wrap|Line Numbers
  1. <xsl:value-of select="document('/µ.xml')"/>
Gives no response. No error, no warning, no nothing. And, of course, it doesn't load the file. This is a bit strange, because normally if the document function fails to find a file it will give a warning. This could mean that the file is found, but not opened.

I transform the xslt documents with PHP 5.2 libxml library, and thus have not access to Xpath 2.0 (and its uri escape functions). However, I do not think that function will help me, I have tried replacing the µ with "%C2%B5", resulting only in a error (file not found).

Any help, pointers and directions is gratefully appreciated!
Jan 22 '08 #1
3 4140
I tried using

& #956; (HTML 4.01 Symbol Entities)


& #181; (ISO 8859-1 Symbol Entities)


With no success. The result was the same as described above: no error, warning etc.
Jan 22 '08 #2
I have now tried

& #xB5; (Hexadecimal NCRs:)

With no success. The result was the same as described above: no error, warning etc.

I also noted that I can't use code points -- xpath 2.0 function, unfortunately.

There are no more character sets variations I am aware of that I cold try out. I'm at a complete loss here...
Jan 22 '08 #3
I have confirmed that Apache does find the path correctly, i.e. the request for the /µ.xml file by XSLT document() function is successful. (I used filemon)

Then why isn't the XML being processed?

I can currently only think of one possibility: after the document is loaded it has to be processed by PHP, perhaps the fault lies there?

I know PHP has problems with non-English characters, and that you can't run an UTF-8 supported character in most PHP functions.

When I send data from PHP to XML it must be converted to UTF-8. I would guess then, if data is sent back to PHP (for processing) it must be converted back to PHP character standard (I believe it's ISO-8859-1).

This is more a PHP question now, and I will start a new thread in the appropriate forum.

If anyone, however, have had similar problems with the xslt document() function, please comment! Thank you.
Jan 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hugo Fjelsted Alrøe | last post by:
I am fairly new at MySQL, so please excuse any ignorance. We are using MySQL (version 3.23.48) in connection with an Eprints = archive. We have non-english deposits in the archive, and...
0
by: Mark Stralka | last post by:
My company's enterprise directory is supposed to store all data fields in English. Before the data standards were implmented, many of the HR systems that fed data into the ED were sending some...
3
by: TeekUS | last post by:
hey ppl, i am currently developing a parsing application my input is a 10MB english text file the parsing works fine however every now and then a non english character appears that messes...
2
by: Joachim | last post by:
I'm using the following to transfer the content of two strings containing non-english letters byte responseB = Encoding.ASCII.GetBytes(responseHdr.ToString() + responseBody.ToString()); But...
0
by: Johan | last post by:
Hi, Anyone know how to tell request.item to return non-english characters. In my example the scandiavian letters ÅÄÖåäö (AAOaao with circles and dots above) gets skiped. Here is the code in...
4
by: davermcl | last post by:
Hi, I'm experiencing a problem when using the VB SendKeys method. I'm sending characters to a textbox in another application. It works fine when the Windows Input Languages on both apps are...
12
by: Logos | last post by:
Yes, eval is a tool of the devil and I'll burn for using it. However, in this instance it's quite handy and I'm quite lazy. So, here's a weird one, and I'm wondering if anyone has a workaround....
3
by: prajithgg | last post by:
Hi, I am facing some problem while inserting some non English characters to DB2 server from my java application. We are not able to retrieve the same record when searched with the same non English...
3
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi I have two updatepanels on an asp.net page and when there is a postback from one updatepanel it changes the non english characters in the other and displays some crap instead. Characters...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.