|
|
|
apex + mod_owa + apache 2.2 + ubuntu x32 проблемы с кодировкой
|
|||
|---|---|---|---|
|
#18+
Добрый день. Никак не могу понять, где что забыл: Имеется: ubuntu 13.04 x32, oracle 10.2.0.1.0, apex 4.2.1.00.08, apache 2.2.2. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.08.2013, 12:01 |
|
||
|
apex + mod_owa + apache 2.2 + ubuntu x32 проблемы с кодировкой
|
|||
|---|---|---|---|
|
#18+
smittyperm, А где описание проблемы? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.08.2013, 12:05 |
|
||
|
apex + mod_owa + apache 2.2 + ubuntu x32 проблемы с кодировкой
|
|||
|---|---|---|---|
|
#18+
Прошу прощения (ctrl+enter по привычке). Кодировка oracle xe: Код: plsql 1. 2. Настроил все следующим образом: В скрипт запуска apache добавил: Код: plsql 1. В виртуальный хост Location записал с такойже кодировкой: Код: plsql 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. Проблема в том что при отображении любой информации из БД (например русские символы в select list, полученные запросом), выдается: Error during rendering of page item P2_RESORA-06502: PL/SQL: numeric or value error: character string buffer too small Technical Info (only visible for developers) is_internal_error: true apex_error_code: WWV_FLOW_FORM.UNHANDLED_ERROR ora_sqlcode: -6502 ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character string buffer too small component.type: APEX_APPLICATION_PAGE_ITEMS component.id: 2658219846444118 component.name: P2_RES error_backtrace: ORA-06512: at "SYS.HTP", line 1529 ORA-06512: at "SYS.HTP", line 1714 ORA-06512: at "APEX_040200.WWV_FLOW_PLUGIN_UTIL", line 433 ORA-06512: at "APEX_040200.WWV_FLOW_NATIVE_ITEM", line 1669 ORA-06512: at "APEX_040200.WWV_FLOW_NATIVE_ITEM", line 1809 ORA-06512: at "APEX_040200.WWV_FLOW_NATIVE_ITEM", line 4241 ORA-06512: at "APEX_040200.WWV_FLOW_PLUGIN", line 1251 ORA-06512: at "APEX_040200.WWV_FLOW_FORMS", line 977 ORA-06512: at "APEX_040200.WWV_FLOW_FORMS", line 1406 Опытным путем пришел к тому что если в виртуальном хосте апача написать кодировку: Код: plsql 1. То почти все заработает, кроме любого символа кирилицы при использовании htp.p. В этом случае будет так: Error during rendering of region "canvas".ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "SYS.HTP", line 1536 ORA-06512: at "SYS.HTP", line 1714 ORA-06512: at line 8 ORA-06502: PL/SQL: numeric or value error: character string buffer too small Technical Info (only visible for developers) is_internal_error: true apex_error_code: APEX.REGION.UNHANDLED_ERROR ora_sqlcode: -6502 ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "SYS.HTP", line 1536 ORA-06512: at "SYS.HTP", line 1714 ORA-06512: at line 8 ORA-06502: PL/SQL: numeric or value error: character string buffer too small component.type: APEX_APPLICATION_PAGE_REGIONS component.id: 2659007399469462 component.name: canvas error_backtrace: ORA-06512: at "SYS.HTP", line 1536 ORA-06512: at "SYS.HTP", line 1714 ORA-06512: at line 8 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1202 ORA-06512: at "SYS.WWV_DBMS_SQL", line 973 ORA-06512: at "SYS.HTP", line 1536 ORA-06512: at "SYS.HTP", line 1714 ORA-06512: at line 8 ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 4612 ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 3219 Через стандартный http сервер oraclexe все работает нормально. Что я делаю не так? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.08.2013, 12:18 |
|
||
|
apex + mod_owa + apache 2.2 + ubuntu x32 проблемы с кодировкой
|
|||
|---|---|---|---|
|
#18+
Решение. Сам нашел ответ здесь: https://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm OWA gives PL/SQL errors with multi-byte databases This is due to an incorrect implementation of the page buffer in the HTF package (pubht.sql and privht.sql). The problem arises because SQL and PL/SQL data buffers measure their maximum lengths in bytes, whereas all string operations, e.g. SUBSTR, LENGTH, etc., measure in characters. As a result, the HTBUF_LEN limit of 255 is not enforced properly with multi-byte character sets. I am trying to get Oracle to fix this by using the byte-based equivalents SUBSTRB, LENGTHB, etc. in the underlying code. Meanwhile, the simple fix is to use the OwaCharsize directive to reduce this limit based on your worst-case character size. For most multi-byte character sets, this will be 2 bytes per character, so the limit would be 127. For old UTF8 Unicode, it's 3 bytes per character, meaning the limit should be 85. For the newer AL32UTF8 Unicode, it's 4 bytes per character, and the limit should be 63. For a small number of Asian character sets it's also 4 bytes per character (you can recognize them because they will have a "32" in the Oracle character set name, e.g. "ZHT32EUC"), and the limit should be 63. OwaCharsize can be used to set the number of bytes per character N, which will cause mod_owa to force the buffer length down to floor(255/N). If in doubt, setting OwaCharsize to 4 is generally safest, although it may reduce performance. Таким образом, если у вас бд с кодировкой AL32UTF8, используйте, например: Код: plsql 1. 2. Обратите внимание на дефис в UTF-8. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.08.2013, 22:00 |
|
||
|
|

start [/forum/topic.php?fid=50&fpage=47&tid=1875593]: |
0ms |
get settings: |
14ms |
get forum list: |
16ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
22ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
60ms |
get tp. blocked users: |
1ms |
| others: | 228ms |
| total: | 359ms |

| 0 / 0 |
