[PHP-BUG] Bug #63892 [NEW]: Stock browser demo exception with some locales

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PHP-BUG] Bug #63892 [NEW]: Stock browser demo exception with some locales

Guthrie at att dot net
From:             gianluca dot faieta at gmail dot com
Operating system: Windows
PHP version:      Irrelevant
Package:          PHP-GTK related
Bug Type:         Bug
Bug description:Stock browser demo exception with some locales

Description:
------------
The stock icons browser from php-gtk-src demos throws exception when run
under
italian, spanish and french locales (Control Panels > Region and Language).
It
works normally when run under english, german and dutch locales.

The script was tested on Windows Server 2008 SP2, Windows XP SP2 and
Windows 7
with same error. Multiple PHP binaries were tested, with same outcome:

- http://emsmith.net/gtk/php-5.3.15-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-5.4.5-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-gtk-2012-5.4-snapshot.zip

Old php-gtk package works (http://gtk.php.net/do_download.php?
download_file=php-gtk-2.0.1-win32-nts.zip)


Test script:
---------------
https://raw.github.com/php/php-gtk-src/master/demos/stock-browser.php

Actual result:
--------------
Warning: Could not convert item label from UTF-8 in
C:\zdemos\stock-browser.php
on line 120

Fatal error: Uncaught exception 'PhpGtkGErrorException' with message
'Sequenza di
byte non valida nell'ingresso per la conversione' in C:\zdemos\stock-
browser.php:120
Stack trace:
#0 C:\zdemos\stock-browser.php(120): Gtk::stock_lookup('gtk-go-down')
#1 C:\zdemos\stock-browser.php(52): StockItemBrowserDemo->create_model()
#2 C:\zdemos\stock-browser.php(253): StockItemBrowserDemo->__construct()
#3 {main}
  thrown in C:\zdemos\stock-browser.php on line 120


--
Edit bug report at https://bugs.php.net/bug.php?id=63892&edit=1
--
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=63892&r=trysnapshot54
Try a snapshot (PHP 5.3):   https://bugs.php.net/fix.php?id=63892&r=trysnapshot53
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=63892&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63892&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63892&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63892&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63892&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63892&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63892&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63892&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=63892&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=63892&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63892&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63892&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63892&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63892&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63892&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63892&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63892&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63892&r=mysqlcfg


--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply | Threaded
Open this post in threaded view
|

Bug #63892 [Opn->Fbk]: Stock browser demo exception with some locales

auroraeosrose
Edit report at https://bugs.php.net/bug.php?id=63892&edit=1

 ID:                 63892
 Updated by:         [hidden email]
 Reported by:        gianluca dot faieta at gmail dot com
 Summary:            Stock browser demo exception with some locales
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            PHP-GTK related
 Operating System:   Windows
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Do you have the correct ini setting for php-gtk?  This WILL not work unless you change your php-gtk.codepage = UTF-8 in php-cli.ini

What is happening is gtk can't convert the string given by the localization to the codepage you have set in your ini, and then PHP is fatal erroring because the string has invalid bytes


Previous Comments:
------------------------------------------------------------------------
[2013-01-03 08:19:31] gianluca dot faieta at gmail dot com

Description:
------------
The stock icons browser from php-gtk-src demos throws exception when run under
italian, spanish and french locales (Control Panels > Region and Language). It
works normally when run under english, german and dutch locales.

The script was tested on Windows Server 2008 SP2, Windows XP SP2 and Windows 7
with same error. Multiple PHP binaries were tested, with same outcome:

- http://emsmith.net/gtk/php-5.3.15-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-5.4.5-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-gtk-2012-5.4-snapshot.zip

Old php-gtk package works (http://gtk.php.net/do_download.php?
download_file=php-gtk-2.0.1-win32-nts.zip)


Test script:
---------------
https://raw.github.com/php/php-gtk-src/master/demos/stock-browser.php

Actual result:
--------------
Warning: Could not convert item label from UTF-8 in C:\zdemos\stock-browser.php
on line 120

Fatal error: Uncaught exception 'PhpGtkGErrorException' with message 'Sequenza di
byte non valida nell'ingresso per la conversione' in C:\zdemos\stock-
browser.php:120
Stack trace:
#0 C:\zdemos\stock-browser.php(120): Gtk::stock_lookup('gtk-go-down')
#1 C:\zdemos\stock-browser.php(52): StockItemBrowserDemo->create_model()
#2 C:\zdemos\stock-browser.php(253): StockItemBrowserDemo->__construct()
#3 {main}
  thrown in C:\zdemos\stock-browser.php on line 120



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=63892&edit=1

--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply | Threaded
Open this post in threaded view
|

Bug #63892 [Fbk->Csd]: Stock browser demo exception with some locales

Guthrie at att dot net
In reply to this post by Guthrie at att dot net
Edit report at https://bugs.php.net/bug.php?id=63892&edit=1

 ID:                 63892
 User updated by:    gianluca dot faieta at gmail dot com
 Reported by:        gianluca dot faieta at gmail dot com
 Summary:            Stock browser demo exception with some locales
-Status:             Feedback
+Status:             Closed
 Type:               Bug
 Package:            PHP-GTK related
 Operating System:   Windows
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Setting php-gtk.codepage to either UTF-8 or ISO-8859-1 in php.ini fixes the
issue.

Thanks for your help.


Previous Comments:
------------------------------------------------------------------------
[2013-01-07 14:19:54] [hidden email]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Do you have the correct ini setting for php-gtk?  This WILL not work unless you change your php-gtk.codepage = UTF-8 in php-cli.ini

What is happening is gtk can't convert the string given by the localization to the codepage you have set in your ini, and then PHP is fatal erroring because the string has invalid bytes

------------------------------------------------------------------------
[2013-01-03 08:19:31] gianluca dot faieta at gmail dot com

Description:
------------
The stock icons browser from php-gtk-src demos throws exception when run under
italian, spanish and french locales (Control Panels > Region and Language). It
works normally when run under english, german and dutch locales.

The script was tested on Windows Server 2008 SP2, Windows XP SP2 and Windows 7
with same error. Multiple PHP binaries were tested, with same outcome:

- http://emsmith.net/gtk/php-5.3.15-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-5.4.5-nts-php-gtk-snapshot.zip
- http://emsmith.net/gtk/php-gtk-2012-5.4-snapshot.zip

Old php-gtk package works (http://gtk.php.net/do_download.php?
download_file=php-gtk-2.0.1-win32-nts.zip)


Test script:
---------------
https://raw.github.com/php/php-gtk-src/master/demos/stock-browser.php

Actual result:
--------------
Warning: Could not convert item label from UTF-8 in C:\zdemos\stock-browser.php
on line 120

Fatal error: Uncaught exception 'PhpGtkGErrorException' with message 'Sequenza di
byte non valida nell'ingresso per la conversione' in C:\zdemos\stock-
browser.php:120
Stack trace:
#0 C:\zdemos\stock-browser.php(120): Gtk::stock_lookup('gtk-go-down')
#1 C:\zdemos\stock-browser.php(52): StockItemBrowserDemo->create_model()
#2 C:\zdemos\stock-browser.php(253): StockItemBrowserDemo->__construct()
#3 {main}
  thrown in C:\zdemos\stock-browser.php on line 120



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=63892&edit=1

--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php