I just deployed my Tapestry 5 app on Jetty 9 web server, running on Debian Squeeze. I have problem with encoding. I can't see Serbian letters (šđčćž). For example, I see "Dobrodošli" as "Dobrodo??li". You can check it out HERE. As I know, Tapestry by default works with UTF8, on Debian locale is set SR Latin UTF8, and on Jetty I can't find any config setting where I could set it. I did the same thing local on my PC (Ubuntu 12.10), and everything works great.
Can you help me please? How to solve this problem, I don't know what I did wrong?
Thanks in advance.
Did you try setting value for tapestry.charset.
The character encoding used when generating output (or parsing input).
The default is "UTF-8".
For details checkout http://tapestry.apache.org/configuration.html
Related
I have a problem with encoding characters when I'm trying to run test. I'm using Symfony 4 framework with package symfony/phpunit-bridge.
I'm running test by command like below:
php bin/phpunit tests/WhovianTest.php
The results looks like below:
As we can see there is a problem with encoding in test's results. I'm using windows 10 operating system and PHPStorm IDE.
How could I solve this problem?
I would be grateful for help.
A standard Windows 10 shell has some issues with the ANSI control characters that are used to display colors (they are quite recognisable with the ?[31; characters being displayed). There are some packages to add them, or you can just turn them off.
The phpunit docs suggest:
On Windows, use ANSICON or ConEmu
Alternatively, you can set colors="false" in the opening tag of your phpunit.xml, or as a command line parameter: --colors=never (try auto as well).
I'm using jasper library v. 6.2.2 with Oracle ADF 11, our servers are running Red Hat 6
I'm facing an issue with the special characters like French accent "€ è é ê û â"
when I export the report as a PDF everything works fine but on the same environment when exporting the report as HTML output using SimpleHtmlExporterOutput I get bad charachters like this "è, é..."
i tried changing the encoding to UTF8 and cp1252 when calling the class SimpleHtmlExporterOutput but still facing the same issue,
Thanks in advance
i changed the JAVA_OPTIONS on weblogic start params adding -Dfile.encoding=utf8 and forcing weblogic to start with UTF-8 and this solved my problem
We have an Jenkins CI, which creates our Eclipse RCP application. It was set up with this tutorial: http://www.ralfebert.de/blog/eclipsercp/rcp_builds/ . So far so good, we didn´t have any problems until we decided to use utf-8 encoding for our project instead of the default cp1252 encoding. So the problem is if we start the created application that the encoding is damaged. I tried everything especially with jvm -dfile.encoding="utf-8" arguments. I tried this in rcp.target, jenkins arguments and build.xml build properties.
Have someone any idea how i can fix my problem?
thanks for every response
We have the same issue as well, unfortunately unsolved so far. I think the charset must be set in time of compilation. So this may be a jvm argument instead of program argument.
Make sure you have saved the encoding information in the project. If there is no such information, the eclipse instance default encoding will be used, which in turns defaults to the platform's default encoding.
Buckminster build uses the eclipse build which honors the resource meta data.
An anti pattern is to change the default in Eclipse, and not save it in projects. The next user with a different default then risks creating a complete mess, especially if they also change the default and save.
I deploy a war to my Tomcat 6.0.35 on Win7 64bit and when I use full-interface query page (I mean form.jsp) in Solr Admin to query 2 Chinese character (say it's C1C2) , the debug info shows:
<lst name="debug">
<str name="rawquerystring">æ°è</str>
<str name="querystring">æ°è</str>
<str name="parsedquery">NEWSID:æ°è</str>
<str name="parsedquery_toString">NEWSID:æ°è</str>
...
You can see C1C2 becomes æ°è. I deploy same war file to Tomcat on Linux or on another Win7 64bit of my colleagues' computer, the encoding acts well. Does anyone know why and how can I avoid this problem?
Thanks in advance!
I solved the problem. The evil is Win7's File Virtualization feature. By default, Win7 will enable this feature on several well-known folders, e.g. Windows, Program Files, ProgramData, etc. The effect is that under some conditions, a file will have dual contents and this just happen to occur on my server.xml.
The workaround is clean things in 'c:\Users\<user account>\AppData\local\VirtualStore'. The long-time solution is "Don't install Tomcat in these well-know folders. If you insist, be sure not to install-'n-uninstall too many times."
~~~ How I find this problem (you may not need to see this) ~~~
Two words: "Pure luck". When I use some xml editor to edit tomcat-users.xml and add a user 'test'. I restart Tomcat but can't login to use manager UI. I recheck tomcat-users.xml and see that user is indeed set. Even I uninstall-'n-install different version of Tomcat, login still fails.
Then I use notepad to edit tomcat-users.xml and I'm astonished to see it's the original version Tomcat has installed. After editing it with notepad and restart Tomcat, I can login now.
Very quickly, my thoughts flashes to server.xml and I use notepad to see it. Ah Ha! There's no URIEncoding attrbutes in connector tag. After fixing it, The problem is solved.
Eiplog
In my case, my xml editor and IE both show wrong version, but my other browers and notepad show correct version. I still don't know what algorithm does Win7 uses on File Virtualization, so I think workaround will live for a while.
I'm using the code in this example example and in the runUpdate() function which i put in a javabean in a web application in Netbeans 6.8 with Glassfish v3.
It seems i have an encoding problem because question marks appear in the table.
I have tried so far:
In nbproject->private->private.properties add runtime.encoding=UTF-8>
In project->properties->sources->encoding utf-8
In program files->netbeans->etc->netbeans_conf in netbeans_default_options i add -J-DFile.encoding=UTF-8
In project->properties->build->compiling->additional compiler options -encoding utf-8
In sun-web.xml i added <locale-charset-info default-locale="UTF-8">
<locale-charset-map locale="" charset=""/>
<parameter-encoding default-charset="UTF-8"/>
</locale-charset-info>
Also when i use system.out.print() in the glassfish output panel i get gibberish.
I'm in the last level of madness please take a look.
Thank you.
EDIT
Also when i do listing .5 i get a glassfish error:
WARNING: WEB0500: default-locale attribute of locale-charset-info element is being ignored
Have you tried using glassfish-web.xml instead of sun-web.xml ?
To change default Glassfish POST fields encoding, I put this to WEB-INF/glassfish-web.xml, and it worked (I use glassfish 3.1.2):
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD
GlassFish Application Server 3.1 Servlet 3.0//EN"
"http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<parameter-encoding default-charset="UTF-8" />
</glassfish-web-app>
I'm not sure if it will help you, but may help other people having the same problem as me.
Glassfish uses ISO-8859-1 encoding by default. See http://download.oracle.com/docs/cd/E19798-01/821-1752/beafu/index.html for more information.
Are you sure your browser is set to UTF-8. By default most browsers do not display in UTF.
Start with the browser and work backwards. Is your datasource storing the data in UTF-8? By default Java is in UTF-8 so I am not sure that GF is your real issue.