Hi! On Wed, May 6, 2015 at 4:21 PM, <[email protected]> wrote:
> On Wed, May 6, 2015 at 4:12 PM, Marius Dumitru Florea > <[email protected]> wrote: > > 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. > > Problem is that XWiki does not really knows it, not in a generic way. > > Then, please, must I report an issue? My use case here: we frequently use plain-text files as exchange media for some sets of simple information that always content accented vowels and ñ (Spanish names and surnames and institutions' names). In several ways we promote the use of UTF-8 encoding all along the "chain of producers" of such files. People accessing then as attached files to XWiki pages depicting a snapshot at a given time of, for instance, the composition of a group. Those users occasionally use their web browsers to access that kind of files. From here, we receive frequent complaints about garbled files. The solution is so simple as to manually change Text Encoding in the web browser to UTF-8 or set it by default. But this is out of our scope to control such settings! Thus, it will be great if we can send that information to the client, to the browser. Follow this discussion is no clear to me if the response sent by XWiki must or can include that information when responding to calls asking for attached text files. Mustn't it? Thanks for your time! Ricardo > > > >> > >> 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 > > > > -- > Thomas Mortagne > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > -- 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
