[Zope] Re: Text truncated by Netscape (but not by Explorer)
Pierre Dricot
dricot@dupuis.be
Fri, 06 Apr 2001 11:20:24 +0200
Finally, we have found the solution by using the following tag <dtml-var
expr=3D"_.string.split(AUTEUR_BIO_FR)"> to display the text really transm=
itted through
ODBC:
['Vous', 'n\222\351chapperez', 'pas', 'au', 'Colonel', 'Moutarde', '!', '=
De',
'MADAME', 'FIGARO', '\340', 'MODES', '&', 'TRAVAUX,', 'Moutarde', 'enlumi=
ne', 'les',
'pages', 'des', 'plus', 'grands', 'ma\000gazines.', 'Des', 'INROCKUPTIBLE=
S', '\340',
'OKAPI,', 'le', 'Colonel', 'baladait', 'son', 'charme', 'et', 'ses', 'ima=
ges',
'aux', 'couleurs', 'lumineuses', 'quand', 'la', 'passion', 'de', '\000la'=
, 'BD',
'l\222a', 'surpris', 'au', 'd\351tour', 'd\222une', 'page', 'de', 'L\222\=
311QUIPE',
'MAGAZINE.', 'Et', 'en', 'bande', 'dessin\351e', 'comme', 'en', 'illustra=
tion,',
'le', 'Colonel', 'Moutarde', 'd\000onne', 'le', 'meilleur', 'de', 'lui-m\=
352me',
'!']
As you can see, there is a special caracter \000 is some words most proba=
bly
inserted by SQL Server every 125 caracters and Netscape reacts inconsiste=
ntly. The
solution was simply to remove this caracter with the following tag:
expr=3D"_.string.replace(AUTEUR_BIO_FR,'\000','')"
So the problem wasn't inside Zope...
> Pierre Dricot a =E9crit :
>
> > A long text description is stored as ntext(16) in a MSSQL7 database a=
nd
> > retrieved trough ODBC (ZODBCDA-3.1.0b2-win32-x86). Zope
> > (Zope-2.3.0-win32-x86) runs on a W2000 server.
> >
> > This long description is displayed correctly by Explorer (V5.0) but
> > truncated by Netscape (V4.5).
> >
> > The source page displayed by each navigator is quite different:
> >
> > Explorer:
> > <font color=3D"#0000FF">
> > Vous n=92=E9chapperez pas au Colonel Moutarde ! De MADAME FIGARO =E0 =
MODES &
> > TRAVAUX, Moutarde enlumine les pages des plus grands ma gazines. Des
> > INROCKUPTIBLES =E0 OKAPI, le Colonel baladait son charme et ses image=
s aux
> > couleurs lumineuses quand la passion de la BD l=92a surpris au d=E9t=
our
> > d=92une page de L=92=C9QUIPE MAGAZINE. Et en bande dessin=E9e comme e=
n
> > illustration, le Colonel Moutarde d onne le meilleur de lui-m=EAme !
> > <BR>
> >
> > Netscape:
> > <font color=3D"#0000FF">
> > Vous n=92=E9chapperez pas au Colonel Moutarde ! De MADAME FIGARO =E0 =
MODES &
> > TRAVAUX, Moutarde enlumine les pages des plus grands ma<BR>
> >
> > As you can see, it seems that there is a special caracter exactly whe=
re
> > the text is truncated by Netscape: the french word "magazines" is in =
two
> > words in Explorer ("ma gazines"). Another word ("donne") at the end o=
f
> > the text is also in two words ("d onne"). This special caracter seems=
to
> > appear every 125th caracter in the text description and is ignored wh=
en
> > displayed by explorer.
> >
> > I'am surprised by the fact that Zope seems to have a different behavi=
our
> > depending on the navigator used, because the content of the generate=
d
> > page is different for each one.
> >
> > Moreover, the same text retrieved when testing the OBDC connection
> > inside Zope doesn't have these special caracters as you can see belo=
w:
> > Z ODBC Database Connection at /eCatalog/ZopeCatalogueProduction
> > ---------------------------------------------------------------------=
-----------
> >
> > AUTEUR BIO FR
> > Vous n=92=E9chapperez pas au Colonel Moutarde ! De MADAME FIGARO =E0 =
MODES &
> > TRAVAUX, Moutarde enlumine les pages des plus grands magazines. Des
> > INROCKUPTIBLES =E0 OKAPI, le Colonel baladait son charme et ses image=
s aux
> > couleurs lumineuses quand la passion de la BD l=92a surpris au d=E9to=
ur
> > d=92une page de L=92=C9QUIPE MAGAZINE. Et en bande dessin=E9e comme e=
n
> > illustration, le Colonel Moutarde donne le meilleur de lui-m=EAme !
> > ---------------------------------------------------------------------=
-----------
> >
> > SQL Used:
> > select AUTEUR_ID, AUTEUR_BIO_FR
> > from AUTEURS
> > where AUTEUR_ID =3D 149
> >
> > Thanks for your help !