Télécharger
Développer
Compte
Télécharger
Développer
Connexion
Mot de passe oublié ?
Créer un compte
Langue
Aide
Langue
Aide
×
Connexion
Nom du compte
Mot de passe
×
Mot de passe oublié ?
Traduction statut du Français
Catégorie :
Logiciel
Peuple
PersonalForge
Magazine
Wiki
Recherche
OSDN
>
Trouver un logiciel
>
Multimédia
>
Graphics
>
Capture
>
WhiteTable
>
Ticket List/Search
>
Ticket #3260
WhiteTable
Description
Résumé du projet
Dashboard - Développeur
Page Web
Développeurs
Galerie d'images
Liste des flux RSS
Activité
Statistiques
Historique
Téléchargements
List of Releases
Stats
Code Source
Liste des dépôts de code
CVS
Voir le référentiel
Ticket
Liste des tickets
Liste des Jalons
Liste des types
Liste des composants
Liste des tickets/RSS fréquemment utilisés
Soumettre un nouveau ticket
Documents
Communication
Liste des forums
general (8)
Forum d’aide (1)
Discussion-Ouverte (3)
Nouvelles
Ticket #3260
Liste des tickets
Soumettre un nouveau ticket
RSS
Linuxで利用するとDBに入る番組表が文字化けする
Date d'ouverture:
2003-11-02 05:04
Dernière mise à jour:
2007-09-03 01:11
monitor
ON
OFF
Rapporteur:
takuya-o
Propriétaire:
(Aucun)
Type:
Patches
État:
Atteints
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
9 - le plus élevé
Sévérité:
5 - moyen
Résolution:
Aucun
Fichier:
Aucun
Détails
Répondre
インターネットテレビガイドは、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
Priorité
Update from
5 - moyen
to
9 - le plus élevé
2007-09-03 01:11
Updated by:
takuya-o
Ticket Close date
is changed to
2007-09-03 01:11
État
Update from
Ouvert
to
Atteints
Attachment File List (
0
)
Attachment File List
No attachments
Modifier
Ajouter un commentaire
You are not logged in.
I you are not logged in, your comment will be treated as an anonymous post. »
Connexion
Ajouter un commentaire
Aperçu
Soumettre
ているみたいだが、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);
+ }
}
/**