php-i18n Digest 11 Jun 2003 19:39:14 -0000 Issue 177
Topics (messages 571 through 573):
gettext-0.12.1 is released
571 by: Bruno Haible
Re: mb_string and ob_gzhandler() question
572 by: Moriyoshi Koizumi
Reading a file
573 by: Daniel Pomrehn
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Available at
http://www.haible.de/bruno/gnu/gettext-0.12.1.tar.gz
Later at
ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.12.1.tar.gz
News in 0.12.1 (since 0.11.5):
* The gettext package is now separated into two subpackages:
- gettext-runtime: Runtime libraries and programs.
- gettext-tools: Tools and documentation for developers and translators.
The 'gettext-runtime' package is very small and should be installed on every
system that has users who desire to use internationalization. Whereas the
'gettext-tools' package is only for developers and translators.
* The po/Makevars file has a new field MSGID_BUGS_ADDRESS, which program
maintainers should fill in, to help feedback from the translators to the
program maintainers.
xgettext, accordingly, has a new option --msgid-bugs-address.
* Programming languages support:
- C++
A new C++ class, called gnu::autosprintf, makes it possible to use
C format strings in C++. This is needed for proper internationalization
of C++ programs.
- Java
All the tools that manipulate PO files can work with .properties files
as well, if given the --properties-input and/or --properties-output
option. To create a .properties file from a PO or POT file, use
"msgcat --properties-output".
- Smalltalk
xgettext now also supports Smalltalk.
- PHP
xgettext now also supports PHP.
- Python
"xgettext --language=Python" now supports the plural handling functions
ngettext, dngettext, ungettext (introduced in Python 2.3).
- A new autoconf macro AM_PO_SUBDIRS is added. It is like AM_GNU_GETTEXT,
for packages written in other languages than C/C++.
* A new library libgettextpo, with public header file "gettext-po.h",
provides functions for reading PO files into memory. It is useful for
applying PO files to areas not covered by the GNU gettext programs.
New documentation section:
- Writing your own programs that process PO files.
* New documentation sections:
- Prioritizing messages: How to determine which messages to translate first.
- Names: Marking Proper Names for Translation.
* xgettext now supports msgid strings in other encodings than ASCII.
xgettext has a new option --from-code that specifies the encoding of the
source files. The resulting POT files are UTF-8 encoded.
* Tools for translators:
- msgmerge has a new option -N/--no-fuzzy-matching that inhibits the fuzzy
search for untranslated messages.
- msgattrib has new options --only-file and --ignore-file that cause the
specified attribute manipulation to apply to selected messages only.
* Compatibility with automake-1.7.
* In documentation section po/LINGUAS:
- Document the optional "languages" [EMAIL PROTECTED] and [EMAIL PROTECTED]
* New configuration option --enable-relocatable. See the INSTALL file for
details.
Enjoy!
Bruno
--- End Message ---
--- Begin Message ---
Hi,
Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote:
> I remember reading somewhere a while back that the where problems with
> using mb_string and setting output_handler in php.ini but I can't seem
> to find anything in the PHP documentation that says it's a bad idea.
>
> I'm thinking of installing either ob_gzhanlder() or my own
> output_handler (which would tidy op the HTML using Tidy and then gzip
> the output). However my PHP installation is set up to use mb_string
> (mbstring.encoding_translation = On).
Just for clarification:
1. mbstring.encoding_translation has nothing to do
with mb_output_handler indeed. It only affects form processing behaviour,
while mb_output_handler converts the output encoding from
internal_encoding to http.output. The following diagram illustrates
how the mbstring extension works in the script execution.
[FORM INPUT] (mbstring.http_input)
|
| conversion (if mbstring.encoding_translation=on)
|
[SCRIPT VARIABLES] (mbstring.internal_encoding)
|
| conversion (if output_handler is set to "mb_output_handler")
|
[SCRIPT OUTPUT TO THE BROWSER] (mbstring.http_output)
2. Output encoding conversion can be achieved by
putting ob_start('mb_output_handler') at the top of your
script as output_handler directive actually instructs php to does the same
operation to the output buffering facility at the start of script
execution.
3. It's not possible to add ob_gzhandler() to the output handler stack
before mb_output_handler(), because it doesn't make sense at all to
transform the data already gzip-encoded, which is irrelevant to any
"human-readable" encodings, by mb_output_handler(). But this restriction
is not documented yet as far as I know.
<?php
/* this works */
ob_start('ob_gzhandler');
ob_start('mb_output_handler');
?>
<?php
/* this doesn't work */
ob_start('mb_output_handler');
ob_start('ob_gzhandler');
?>
> Is there still (if there ever was) a problem with using mb_string and
> setting up my own output handler?
How did you set up the output handlers in your script? I didn't ever
encountered a problem with any combos of mb_output_handler() and a custom
output handler.
Regards,
Moriyoshi
--- End Message ---
--- Begin Message ---
Hello,
I want to read a file, in which line-makeups are stored. With the fgets
Function this is not possible. Can you tell me, with which function I can
read those files?
Thank you
Daniel Pomrehn
_________________________________________
[EMAIL PROTECTED]
www.daniel-pomrehn.de
--- End Message ---