-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

- --On 2004-07-16 11:07 +0400 Artem Pastukhov wrote:

> Software on my server:
> Midgard version 1.5.1
> apache 1.3.31rusPL30.20
> php - 4.3.0
> Midcom - 1.3.1
> 
> 1. <(breadcrumb)> and "Location" in midcom-admin: �text is shown as
> follows instead of the russian language:
> <p class="breadcrumb">
> � � � � � � � � � � � <a href="/first/"
> class="breadcrumb">&ntilde;&iacute;
> &Eacute;&Icirc;&Ocirc;&Aring;&Ograve;&Icirc;&Aring;&Ucirc;&Icirc;&Igr
> ave;</a
>> 
> &gt; YAM International
> &ETH;&Iuml;&Igrave;&Eacute;&Ccedil;&Ograve;&Aacute;&AElig;&Eacute;&TH
> ORN;&Ar ing;&Oacute;&Euml;&Iuml;&Aring;
> &Iuml;&Acirc;&Iuml;&Ograve;&Otilde;&Auml;&Iuml;&times;&Aacute;&Icirc;
> &Eacute ;&Aring;
> &Eacute;
> &Ograve;&Aacute;&Oacute;&Egrave;&Iuml;&Auml;&Icirc;&Ugrave;&Aring;
> &Iacute;&Aacute;&Ocirc;&Aring;&Ograve;&Eacute;&Aacute;&Igrave;&Ugrave;
> </p>

This sounds, like you are using a non-complete UTF-8 envorionment.
Midgard/MidCOM in its standard setting will quote-away almost anything
that is not part of ISO-8859-1/15. Please ensure that your Midgard/PHP
is running in UTF-8 Mode, the corresponding Apache configuration should
include this:

|     # UTF 8 mode
|     MidgardParser russian
|     php_value default_charset UTF-8
|     php_value mbstring.func_overload 7
|     php_value mbstring.internal_encoding UTF-8
|     php_value mbstring.detect_order UTF-8
|     
|     
|     <IfModule mod_charset.c>
|         CharsetDefault utf8
|         CharsetSourceEnc utf8
|         CharsetDisable off
|         AddDefaultCharset UTF-8
|     </IfModule>


Also, there is a known bug within MidCOM <= 1.3.1, because it uses
htmlentities in various places instead of htmlspecialchars. This bug
has been fixed in CVS for both stable and devel branches, so you can
either wait for MidCOM 1.3.2, which is probably only a couple of days
away, or you can use sed on the midcom.xml file: Replace each and every
occurence of the term "htmlentities" with "htmlspecialchars" in it,
then import it again adding the switch -a to the repligard command line
(e.g. repligard -a -i midcom.xml).

The final thing you have to do is to execute the following few lines of
PHP code directly _after_ you have included the midcom.xml snippet
(usually somewhere in code-global).

| $i18n =& $midcom->get_service("i18n");
| $i18n->set_charset("utf-8");

This will move that part of MidCOM, that is already charset aware, to
use UTF-8 as an output encoding. Unfortunalety, again there are a bunch
of places, where you might run into encoding problems resulting from
the use of htmlentities, many of these bugs are also resolved in 1.3.2,
so you might upgrade to it anyway if it is ready.


Sorry for the inconvenience, but I've not yet had the time to make
MidCOM completly charset-aware. In its beginnings I would have never
thought, that it would be so widely adopted -- which led to a few
design inefficiencies like the i18n stuff you're just stumbling over.


> 2. In midcom-admin some paths to pictures are wrong :
> http://sample.site:8001/first/midcom-admin/ais/midcom-serveattachment
> guid-fbc540ee1c9a0edcf4f6b7b90401ad4b/new-dir
> http://sample.site:8001/first/midcom-admin/ais/midcom-serveattachment
> guid-f0dea5357defc2068cf041cb7120108a/edit-folder
> http://sample.site:8001/first/midcom-admin/ais/midcom-serveattachment
> guid-ee0a026d1c13b13130f26c98ae0b4d32/trash
> http://sample.site:8001/first/midcom-admin/ais/midcom-serveattachment
> guid-67c9d02f9e608615d30e3bc5d391cf04/attach
> http://sample.site:8001/first/midcom-admin/ais/midcom-serveattachment
> guid-cfa7011520b53fd7f8a96a3a8e52e12a/new-html And some in editor.

This sounds like a problem resulting from MidCOM template, because I
cannot follow this bugs on the devel-servers. I, unfortunalety, have
not much experience with midcom-template, perhaps one of the guys at
Nemein could take a look into this one?

You could do us a favor trying this to find out the actual URLs needed:

Move the URL upwards directory-wise by removing subdirs before
midcom-serve-attachment, that is, starting with dropping the "ais/". 

In theory, at least ..first/midcom-serve..., probably
...first/midcom-admin/midcom-serve... should work.


Live long and prosper!
Torben Nehmer

- --
Torben Nehmer, Guenzburg, Bavaria, Germany
http://www.nathan-syntronics.de, mailto:[EMAIL PROTECTED]
PGP Public Key: https://www.link-m.de/pgp/t.nehmer.asc
-----BEGIN PGP SIGNATURE-----
Version: Mulberry PGP Plugin v3.0
Comment: processed by Mulberry PGP Plugin

iQA/AwUBQPtlHCT4eCp+neRWEQK0mgCgnd3a7y2DQjPHG/NFrc4xDpI8v24An3Q1
uxnCWXL/IlbTwFvSpq4rnLm8
=RuZu
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to