Descargar
Desarrollar
Cuenta
Descargar
Desarrollar
Entrar
Forgot Account/Password
Crear Cuenta
Idioma
Ayuda
Idioma
Ayuda
×
Entrar
Nombre de usuario
Contraseña
×
Forgot Account/Password
Translation Status of Español
Categoría:
Software
Gente
PersonalForge
Magazine
Wiki
Buscar
OSDN
>
Buscar Software
>
Multimedia
>
Graphics
>
Capture
>
WhiteTable
>
Ticket List/Search
>
Incidencia #3260
WhiteTable
Descripción
Project Summary
Developer Dashboard
Página Web
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
Historial
Descargas
List of Releases
Stats
Código Fuente
Code Repository list
CVS
Ver Repositorio
Incidencia
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
Communication
List of Forums
general (8)
Ayuda (1)
Open Discussion (3)
Noticias
Incidencia #3260
Ticket List
Submit New Ticket
RSS
Linuxで利用するとDBに入る番組表が文字化けする
Abrir Fecha:
2003-11-02 05:04
Última actualización:
2007-09-03 01:11
monitor
ON
OFF
Informador:
takuya-o
Propietario:
(Ninguno)
Tipo:
Patches
Estado:
Cerrado
Componente:
(Ninguno)
Hito:
(Ninguno)
Prioridad:
9 - Highest
Gravedad:
5 - Medium
Resolución:
Ninguno
Fichero:
Ninguno
Details
Responder
インターネットテレビガイドは、Shift JISでエンコードされ
ているみたいだが、Context-typeを見て漢字のエンコーディ
ングを行っていないため、LinuxのようにJava VMのdefault
エンコーディングが、Sift JISでない場合にDBに正しく番組表
が記録されない。
#Windowsでは、defaultエンコーディングが、Shift JISなので
ため問題なし。
本来は、インターネットテレビガイドから取って来たHTTP
レスポンスのContext-typeヘッタでエンコードを決めるべき。
しかし、Context-Typeを解釈するのには手間がかかるので、
とりあえずは、レスポンス全体をJISAutoDetectでエンコード
すれば、DBに正しい漢字コードで保存することができる。
Index:
jp/sourceforge/whitetable/util/iepg/IEPGProgramFactory.
java
=======================================================
============
RCS
file: /cvsroot/whitetable/src/jp/sourceforge/whitetable
/util/iepg/IEPGProgramFactory.java,v
retrieving revision 1.5
diff -u -r1.5 IEPGProgramFactory.java
---
jp/sourceforge/whitetable/util/iepg/IEPGProgramFactory.
java 18 May 2003 18:12:03 -0000 1.5
+++
jp/sourceforge/whitetable/util/iepg/IEPGProgramFactory.
java 1 Nov 2003 20:02:22 -0000
@@ -105,7 +104,13 @@
/** 文字列を解析してTVProgramオブジェクトを返しま
す。
*/
public TVProgram[] analyze(InputStream is) throws
WhiteTableException {
- return this.analyze(new InputStreamReader
(is));
+ try {
+ return this.analyze(new InputStreamReader
(is, "JISAutoDetect")); //TKYN
+ } catch (UnsupportedEncodingException e) {
+ throw new WhiteTableException(e);
+ } catch (WhiteTableException e) {
+ throw new WhiteTableException(e);
+ }
}
/**
Ticket History (2/2 Histories)
2003-11-02 05:33
Updated by:
takuya-o
Prioridad
Update from
5 - Medium
to
9 - Highest
2007-09-03 01:11
Updated by:
takuya-o
Ticket Close date
is changed to
2007-09-03 01:11
Estado
Update from
Open
to
Cerrado
Attachment File List (
0
)
Attachment File List
No attachments
Editar
Add Comment
You are not logged in.
I you are not logged in, your comment will be treated as an anonymous post. »
Entrar
Add Comment
Vista previa
Submit
ているみたいだが、Context-typeを見て漢字のエンコーディ
ングを行っていないため、LinuxのようにJava VMのdefault
エンコーディングが、Sift JISでない場合にDBに正しく番組表
が記録されない。
#Windowsでは、defaultエンコーディングが、Shift JISなので
ため問題なし。
本来は、インターネットテレビガイドから取って来たHTTP
レスポンスのContext-typeヘッタでエンコードを決めるべき。
しかし、Context-Typeを解釈するのには手間がかかるので、
とりあえずは、レスポンス全体をJISAutoDetectでエンコード
すれば、DBに正しい漢字コードで保存することができる。
Index:
jp/sourceforge/whitetable/util/iepg/IEPGProgramFactory.
java
=======================================================
============
RCS
file: /cvsroot/whitetable/src/jp/sourceforge/whitetable
/util/iepg/IEPGProgramFactory.java,v
retrieving revision 1.5
diff -u -r1.5 IEPGProgramFactory.java
---
jp/sourceforge/whitetable/util/iepg/IEPGProgramFactory.
java 18 May 2003 18:12:03 -0000 1.5
+++
jp/sourceforge/whitetable/util/iepg/IEPGProgramFactory.
java 1 Nov 2003 20:02:22 -0000
@@ -105,7 +104,13 @@
/** 文字列を解析してTVProgramオブジェクトを返しま
す。
*/
public TVProgram[] analyze(InputStream is) throws
WhiteTableException {
- return this.analyze(new InputStreamReader
(is));
+ try {
+ return this.analyze(new InputStreamReader
(is, "JISAutoDetect")); //TKYN
+ } catch (UnsupportedEncodingException e) {
+ throw new WhiteTableException(e);
+ } catch (WhiteTableException e) {
+ throw new WhiteTableException(e);
+ }
}
/**