R
R
Rendol2012-03-15 19:16:26
PHP
Rendol, 2012-03-15 19:16:26

Why after xslt-conversion in Cyrillic attributes in hexadecimal form?

Actually the question is in the title.

What is available.
The source code responsible for the conversion is the same, the difference is only in the servers.

Incorrect attributes:
<meta name="keywords" content="доста…
view-source:http://www.svetola.ru/
PHP Version => 5.2.10

Correct:
<meta name="keywords" content="delivery, flowers,...
view-source:http://www.spasibo.biz/
PHP Version => 5.3.6-13ubuntu3.2

Moreover the site svetola.ru is deployed on the test server, and everything is fine on it, i.e. the files are the same.What

could be the problem?

PS
Found a similar problem: issues.apache.org/jira/browse/XALANC-665
But he made no progress in his decision.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rendol, 2012-03-17
@Rendol

In my case, the solution was to specify the encoding after importing the files

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:import href="../../../Custom/site/media/xsl/default.xsl"/>
  <xsl:import href="Page.xsl"/>

  <xsl:output encoding="UTF-8" />

</xsl:stylesheet>

Thank you, 1010101001000100110100111, Your code example worked as it should, which led to the conclusion that the problem is in the XSL templates.
The issue with default.xsl remains open. In the specified file, the output is defined:
  <xsl:output
   method="xml"
   version="1.0"
   encoding="UTF-8"
   doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
   indent="yes"
   omit-xml-declaration="yes"
  />

BUT when importing, the encoding is forgotten.

R
Rendol, 2012-03-17
@Rendol

1010101001000100110100111, We are talking about attribute values, the rest of the text is displayed correctly. But the attributes are converted into a hexadecimal representation of characters.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question