Using local characters in INI-files?

Author Message

Nicklas Lundgren

Tuesday 08 August 2006 6:30:06 am

Hi,

I am working on an extension, using its own ini-file. In this file, I need to add some info with swedish language characters like Å, Ä and Ö.
Usage like this:

VariableÖ=62
VariableÅ=50

and so on.

I notice, that eventhough the ini file starts with

<?php /* #?ini charset="iso-8859-1"?

This doesnt work. It seems like the eZIni file handles all existing info in the ini-file as ordinary ASCII.

I have tried to set useTextCodec to true when initializing the eZIni. But that doesnt help.

Is this at all achievable?
Any ideas?

All help is greatly appreciated.

Best regards,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Kristof Coomans

Tuesday 08 August 2006 9:41:31 am

Hello Nicklas

Only a limited set of characters is allowed in the INI variable names, and eZINI even isn't consistent on this allowed set (see my report: http://ez.no/bugs/view/8770 ).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Nicklas Lundgren

Thursday 10 August 2006 6:14:57 am

Hi Kristof,
Thanks for the reply.
However, I solved it by using an array in the ini-file instead, like

MyArray[]
MyArray[VariableÅ]=58

And so on. Then it works, using swedish characters.

Best regards,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 21 2025 06:03:08
Script start
Timing: Jan 21 2025 06:03:08
Module start 'layout'
Timing: Jan 21 2025 06:03:08
Module start 'content'
Timing: Jan 21 2025 06:03:10
Module end 'content'
Timing: Jan 21 2025 06:03:10
Script end

Main resources:

Total runtime1.5662 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.9375151.2109
Module start 'layout' 0.00490.0054 739.148436.6484
Module start 'content' 0.01031.5549 775.7969572.6797
Module end 'content' 1.56530.0009 1,348.476611.8438
Script end 1.5662  1,360.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2187160.0002
Check MTime0.00130.0837160.0001
Mysql Total
Database connection0.00060.036910.0006
Mysqli_queries1.515296.7450570.0266
Looping result0.00070.0416550.0000
Template Total1.514896.720.7574
Template load0.00280.179220.0014
Template processing1.512096.536320.7560
Template load and register function0.00010.007610.0001
states
state_id_array0.00280.178410.0028
state_identifier_array0.00260.166320.0013
Override
Cache load0.00230.1477310.0001
Sytem overhead
Fetch class attribute can translate value0.00060.036520.0003
Fetch class attribute name0.00110.070550.0002
XML
Image XML parsing0.00190.119520.0009
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00310.1960230.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs