On Wed, May 6, 2015 at 4:45 PM, Pascal BASTIEN <[email protected]> wrote: > Helle, > May I? > > i think it is not a xwiki problem because encoding_vowels.txt file is an > attachment of a web page (it is like a file on FTP site). Xwiki ( fortunely) > doesn't change attachment file content. > If I download your file, file command indicate of course: "UTF-8 Unicode > text, with no line terminators" > I think it is more a browser problem (chrome doesn't detect UTF8 encoding of > your file) > If your attachment is a PDF file, it is the same, it depend of browser (if > PDF reader are included in it or not)
> Htttpheader is for web page an not attachment IMO When you click on the link the browser makes an HTTP request (with headers) without knowing (or caring) what the response may be (HTML, text, binary, etc.). The server (XWiki in this case) sends the HTTP response **with headers**, because the headers tell the browser what to do with the response. The Content-Type header tells the browser that the response contains text content. The Content-Type can also specify the encoding. If no encoding is specified then the browser will attempt to detect the encoding (or use some default / configured encoding) which may not be the expected encoding, like in this case. XWiki needs to specify the right encoding in the Content-Type header. > > Pascal B. > > -------------------------------------------- > En date de : Mer 6.5.15, Marius Dumitru Florea > <[email protected]> a écrit : > > Objet: Re: [xwiki-users] struggling with encoding > À: "XWiki Users" <[email protected]> > Date: Mercredi 6 mai 2015, 14h34 > > On Wed, May 6, 2015 at > 2:08 PM, [IDIS Technical Secretariat] Ricardo > Rodríguez <[email protected]> > wrote: > > Hi! > > > > I've set up a XWiki Enterprise 7.0.1 > installation to use UTF-8 as per... > > > > http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding > > > > In spite of this, > only Chrome (both in Windows and Mac OS X platforms) is > > able to correctly show the five accented > vowels contained in an attached > > file > UTF-8 encoded available here... > > > > > > http://portal.idisantiago.es/xwiki/bin/download/ICT/Encoding/encoding_vowels.txt > > If I inspect the HTTP headers > of the response I see: > > Content-Type: text/plain;charset= > > I guess it should have been > > Content-Type: > text/plain;charset=utf8 > > I > can reproduce with a fresh XWiki 7.1M1 (Jetty+HSQLDB). Can > you > report an issue? > > Thanks, > Marius > > > > > > Firefox (Windows and Mac OS X), Safari and Omniweb in Mac OS > X and Internet > > Explorer show them > wrongly by default as... > > > > > http://portal.idisantiago.es/xwiki/bin/download/ICT/Encoding/badRendering.png > > > > I've to manually > select UTF-8 encoding the read it correctly or select > > UTF-8 as default encoding for the > browser. > > > > Please, > is it possible to control the encoding used by a browser to > display > > an attached text file from > XWiki server side? > > > > > Thanks! > > > > Ricardo > > > > -- > > Ricardo Rodríguez > > > Research Management and Promotion Technician > > Technical Secretariat > > > Health Research Institute of Santiago de Compostela > (IDIS) > > http://www.idisantiago.es > > > _______________________________________________ > > users mailing list > > [email protected] > > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
