Encoding problem (Umlaute) in HTTP-Headers
Hi!
I have a servlet that is being called by another server via a POST request.
The request contains user data in HTTP-headers, and whenever there is a
German Umlaut in the user's name, it ends up garbled. :(
The requests character encoding is set to 'ISO-8859-1', according to the servlet
requests getCharacterEncoding() method.
I try to copy the value of a header variable into a String like this:
headerNameValue = request.getHeader("headerNameKey");Which, unfortunatly, doesn't work. For example, the value "G�nter" becomes "G����nter".
Shouldn't the API take care of the encoding, when the CharacterEncoding is set
right in the servlet call?
It looks like it interprets the ISO88591 data as Unicode?
BTW, I'm on a WebSphere 5 server, with Java 1.4.
I've been tearing my hair out on this one for days, so any help is highly appreciated.
Thanks a lot!
Andreas
A header variable with the key 'accept-charset' is not sent.
Only 'accept-encoding', with the value 'gzip, deflate'.
Like I wrote in my first post, the servlet request's character encoding is set to ISO-8859-1,
according to the getCharacterEncoding-method.
I have kind of solved this for now by converting the String 2times back, like this:
try {
headerNameValue = new String((new String(headerNameValue.getBytes(),"UTF-8")).getBytes(),"UTF-8");
} catch (UnsupportedEncodingException e) {
logger.error("Fehler beim Umwandeln der Umlaute im Benutzernamen.",e);
} }This code converts the '����', that my servlet receives, back to '�'.
(The first conversion changes the '����' to '��', the second the remaining '��' to '�').
While this seems to work, I don't think it is the right solution, and I still don't understand what's going on. :)
Regards,
Andreas
Similar Messages
-
Generate PDF using Managed Bean with custom HTTP headers
Background
Generate a report in various formats (e.g., PDF, delimited, Excel, HTML, etc.) using JDeveloper 11g Release 2 (11.1.2.3.0) upon clicking an af:commandButton. See also the StackOverflow version of this question:
http://stackoverflow.com/q/13654625/59087
Problem
HTTP headers are being sent twice: once by the framework and once by a bean.
Source Code
The source code includes:
- Button Action
- Managed Bean
- Task Flow
Button Action
The button action:
<af:commandButton text="Report" id="submitReport" action="Execute" />
Managed Bean
The Managed Bean is fairly complex. The code to `responseComplete` is getting called, however it does not seem to be called sufficiently early to prevent the application framework from writing the HTTP headers.
HTTP Response Header Override
* Sets the HTTP headers required to indicate to the browser that the
* report is to be downloaded (rather than displayed in the current
* window).
protected void setDownloadHeaders() {
HttpServletResponse response = getServletResponse();
response.setHeader( "Content-Description", getContentDescription() );
response.setHeader( "Content-Disposition", "attachment, filename="
+ getFilename() );
response.setHeader( "Content-Type", getContentType() );
response.setHeader( "Content-Transfer-Encoding",
getContentTransferEncoding() );
Issue Response Complete
The bean indirectly tells the framework that the response is handled (by the bean):
getFacesContext().responseComplete();
Bean Run and Configure
public void run() {
try {
Report report = getReport();
configure(report.getParameters());
report.run();
} catch (Exception e) {
e.printStackTrace();
private void configure(Parameters p) {
p.put(ReportImpl.SYSTEM_REPORT_PROTOCOL, "http");
p.put(ReportImpl.SYSTEM_REPORT_HOST, "localhost");
p.put(ReportImpl.SYSTEM_REPORT_PORT, "7002");
p.put(ReportImpl.SYSTEM_REPORT_PATH, "/reports/rwservlet");
p.put(Parameters.PARAM_REPORT_FORMAT, "pdf");
p.put("report_cmdkey", getReportName());
p.put("report_ORACLE_1", getReportDestinationType());
p.put("report_ORACLE_2", getReportDestinationFormat());
Task Flow
The Task Flow calls Execute, which refers to the bean's `run()` method:
entry -> main -> Execute -> ReportBeanRun
Where:
<method-call id="ReportBeanRun">
<description>Executes a report</description>
<display-name>Execute Report</display-name>
<method>#{reportBean.run}</method>
<outcome>
<fixed-outcome>success</fixed-outcome>
</outcome>
</method-call>
The bean is assigned to the `request` scope, with a few managed properties:
<control-flow-rule id="__3">
<from-activity-id>main</from-activity-id>
<control-flow-case id="ExecuteReport">
<from-outcome>Execute</from-outcome>
<to-activity-id>ReportBeanRun</to-activity-id>
</control-flow-case>
</control-flow-rule>
<managed-bean id="ReportBean">
<description>Executes a report</description>
<display-name>ReportBean</display-name>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
The `<fixed-outcome>success</fixed-outcome>` strikes me as incorrect -- I don't want the method call to return to another task.
Restrictions
The report server receives requests from the web server exclusively. The report server URL cannot be used by browsers to download directly, for security reasons.
Error Messages
The error message that is generated:
Duplicate headers received from server
Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple distinct Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.Nevertheless, the report is being generated. Preventing the framework from writing the HTTP headers would resolve this issue.
Question
How can you set the HTTP headers in ADF while using a Task Flow to generate a PDF by calling a managed bean?
Ideas
Some additional ideas:
- Override the Page Lifecycle Phase Listener (`ADFPhaseListener` + `PageLifecycle`)
- Develop a custom Servlet on the web server
Related Links
- http://www.oracle.com/technetwork/middleware/bi-publisher/adf-bip-ucm-integration-179699.pdf
- http://www.slideshare.net/lucbors/reports-no-notes#btnNext
- http://www.techartifact.com/blogs/2012/03/calling-oracle-report-from-adf-applications.html?goback=%2Egde_4212375_member_102062735
- http://docs.oracle.com/cd/E29049_01/web.1112/e16182/adf_lifecycle.htm#CIABEJFB
Thank you!The problem was that the HTTP headers were in fact being written twice:
1. The report server was returning HTTP response headers.
2. The bean was including its own HTTP response headers (as shown in the question).
3. The bean was copying the entire contents of the report server response, including the headers, into the output stream.
Firefox ignored the duplicate header errors, but Google Chrome did not. -
Problem in sending HTTP request to the server.
Hi,
i dveloped an ant script for sar deployment.
i deployed a sar to my local soa server with ant script. it got deployed succesfully..
but when i try to deploy to a remote server, getting the below error..
"Problem in sending HTTP request to the server. Please make sure the server is up and/or check standard HTTP response code for 404"
but the server is up and runnig and i am able to ping it from my machine and also access the console...
below is my script
build.properties
wn.bea.home=C:/Oracle/Middleware
all.needed.jars.path=D:/SourceCode/neededJAR
oracle.soa.home=C:/Oracle/Middleware/Oracle_SOA1
java.passed.home=C:/Oracle/Middleware/jdk160_24
#Deployment environment
deployment.plan.environment=DEV
#Deploy Action
deployAction =redeploy
#credentials
user=weblogic
password=welcome1
#For Composite deployment
serverURL=http://10.177.154.6:7001
forceDefault=true
server=10.177.154.6
port=7001
sarLocation=D:/SourceCode/JAR
build.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="soaDeployAll" default="deployAll">
<echo>basedir ${basedir}</echo>
<property environment="env"/>
<echo>current folder ${basedir}</echo>
<property file="${basedir}/build.properties"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${all.needed.jars.path}/ant-contrib.jar"/>
</classpath>
</taskdef>
<target name="init">
<tstamp>
<format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss"/>
</tstamp>
<property name="build.log.dir" location="${basedir}/buildlogs"/>
<mkdir dir="${build.log.dir}"/> <property name="build.log.filename" value="build_${timestamp}.log"/>
<record name="${build.log.dir}/${build.log.filename}" loglevel="verbose" append="false"/>
<echo message="Build logged to ${build.log.filename}"/>
</target>
<target name="deployAll" depends="init">
<echo>Deploy for environment ${deployment.plan.environment}</echo>
<antcall target="deployAllComposites"/>
</target>
<!-- Following Actions are performed for Composite files in Managed Server - Deploy,Redeploy -->
<target name="deployAllComposites" depends="init">
<foreach target="deployComposites" param="Files">
<fileset dir="${sarLocation}" casesensitive="no" includes="*.jar"/>
</foreach>
</target>
<target name="deployComposites" depends="init">
<basename file="${Files}" property="basename"/>
<echo>Deploy Project ${basename} for environment ${deployment.plan.environment}</echo>
<if>
<equals arg1="${deployAction}" arg2="deploy" />
<then>
<echo message="Deploying composites in Managed server........." />
<ant antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml" inheritAll="true" target="deploy">
<property name="serverURL" value="${serverURL}"/>
<property name="user" value="${user}"/>
<property name="password" value="${password}"/>
<property name="overwrite" value="false"/>
<property name="forceDefault" value="${forceDefault}"/>
<property name="sarLocation" value="${sarLocation}/${basename}"/>
</ant>
</then>
<else>
<echo message="ReDeploying composites in Managed server........." />
<ant antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml" inheritAll="true" target="deploy">
<property name="serverURL" value="${serverURL}"/>
<property name="user" value="${user}"/>
<property name="password" value="${password}"/>
<property name="overwrite" value="true"/>
<property name="forceDefault" value="${forceDefault}"/>
<property name="sarLocation" value="${sarLocation}/${basename}"/>
</ant>
</else>
</if>
</target>
</project>
please help....Hi,
Give the serverURL as http://<host>:<managed.server.port>/soa-infra/deployer and try.
e.g . http://10.177.154.6:8001/soa-infra/deployer
Regards,
Neeraj Sehgal -
HTTP Headers - enabling caching and compression with the portal?
Has anyone configured their web server (IIS or Apache) or use a commercial product to flawlessly cache and compress all content generated by the portal?
Compression and caching is critical for making our portal based applictions work for overseas users. It should be doable, just taking advantage of standard HTTP protocols, but implementing this a complex system like the portal is tricky, we seem to be generating different values in the HTTP Headers for the same types of files (such as CSS).
We are running Apache so can't take advantage of the built in compression capabilities of the .net portal. We are running the java vervion. 6.1 mp1, sql server 2000 (portal, search, collab, publisher, studio, analytics, custom .net and java portlets on remote server).
Basically our strategy is to compress all outgoing static and dynamic text content (html, CSS, javascript), and to cache all static files (CSS, javascript, images) for 6 months to a year depending on file type.
Here are some links on the subjects of caching and compression that I have compiled:
Caching & Compression info and tools
http://www.webreference.com/internet/software/servers/http/compression/
http://www.ibm.com/developerworks/web/library/wa-httpcomp/
http://www.mnot.net/cache_docs/
http://www.codeproject.com/aspnet/HttpCompressionQnD.asp?df=100&forumid=322472&exp=0&select=1722189#xx1722189xx
http://en.wikipedia.org/wiki/Http_compression
http://perl.apache.org/docs/tutorials/client/compression/compression.html
https://secure.xcache.com/Page.aspx?c=60&p=590
http://www.codinghorror.com/blog/archives/000807.html
http://www.howtoforge.com/apache2_mod_deflate
http://www.ircache.net/cgi-bin/cacheability.py
http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/
http://betterexplained.com/articles/speed-up-your-javascript-load-time/
http://betterexplained.com/articles/speed-up-your-javascript-load-time/
http://www.rubyrobot.org/article/5-tips-for-faster-loading-web-sites
http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
http://www.gidnetwork.com/tools/gzip-test.php
http://www.pipeboost.com/
http://www.schroepl.net/cgi-bin/http_trace.pl
http://leknor.com/code/gziped.php?url=http%3A%2F%2Fwww.google.com
http://www.port80software.com/surveys/top1000compression/
http://www.rexswain.com/httpview.html
http://www.15seconds.com/issue/020314.htm
http://www.devwebpro.com/devwebpro-39-20041117DevelopingYourSiteforPerformanceCompressionandOtherServerSideEnhancements.html
http://www.webpronews.com/topnews/2004/11/17/developing-your-site-for-performance-optimal-cache-control
http://www.sitepoint.com/print/effective-website-acceleration
http://nazish.blog.com/1007523/
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/IE_Fiddler2.asp?frame=true
http://www.fiddlertool.com/fiddler/version.asp
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
http://www.web-caching.com/cacheability.html
http://www.edginet.org/techie/website/http.html
http://www.cmlenz.net/blog/2005/05/on_http_lastmod.html
http://www.websiteoptimization.com/speed/tweak/cache/
http://www.webperformance.org/caching//caching_for_performance.html
http://betterexplained.com/articles/how-to-debug-web-applications-with-firefox/
Edited by tkoenings at 06/18/2007 6:26 AMHi Scott,
Does Weblogic platform 8.1 supports netscape? We have developed a portal which
works perfectly on IE but it dies in netscape. Is netUI tags not supported in
Netscape?
Pls reply
manju
Scott Dunbar <[email protected]> wrote:
From a pure HTML perspective Portal does it's rendering with nested
tables.
Netscape 4.x and below have terrible performance with nested tables.
The
problem is not the Portal server but rather Netscape on the client machine.
If IE and/or a recent version of Netscape/Mozilla is not possible then
there are
really only two options:
1) Faster client hardware - not likely to be an acceptable solution.
2) Minimize the number of portlets and the complexity within the portlets.
Neither of these solutions are a great answer, but the 4.7 series of
Netscape is
getting pretty old. Having said that, we've got customers who want to
continue
to use IE 4 :)
Again, though, this problem is, I'm afraid out of our hands. It is the
client
rendering time that is the issue.
cg wrote:
Does anyone know of any known reasons why the 7.0 (did it also with4.0) portal
pages can take up to almost 30 seconds to load in Netscape 4.7? I knowit is a
very generic question but our customer still uses 4.7 and will notuse the portal
b/c it takes so long to load some of the webapps. What the pages willdo when
loading is that the headers will come up and when it gets to the bodyof the page
it seems to stall and then comes up all of a sudden. For some of thepages it
takes 6 seconds and for others it takes about 24-27 seconds.
We have suggested using IE only but that is not an option with allof the customers
and getting a newer version of Netscape is also out of the question.
Any suggestions would be greatly appreciated.--
scott dunbar
bea systems, inc.
boulder, co, usa -
Encoding problems in email while on Windows Mail app
Hello.
I have a question concerning email and encoding problems in the Windows Mail App in Windows 8.1. I have encountered a problem with an email I received, while reading, I see strange ASCII characters in one email. I have never encountered it in
my web browsers nor Gmail, just the Mail App.
I was referred to come here when I had asked a similar question there:
http://answers.microsoft.com/en-us/windows/forum/windows8_1-ecoms/strange-foreign-ascii-characters-appearing-in/911f8a44-c302-4fa1-bcaa-3297b32d9120
I don't know which forum to go to so I picked here.
Is there any way that it can be resolved. I tried to troubleshoot, nothing worked; I even synched, to no avail.
I look forward to a response.
JBHi JB,
The responder on answers was a bit confused. The MSDN forums are for developers to discuss writing their own apps. We cannot help with problems using Windows or its built-in apps.
If the folks on answers cannot help then you may need to open a support incident. See
http://support.microsoft.com , or the folks on answers may be able to direct you to the specific page for the Windows Mail app.
--Rob -
Acrobat Reader X stores PDFs in Temp-folder even when HTTP-headers say no-cache no-store
After updating from Acrobat Reader 9 to 10 we have noticed that PDFs viewed in the browser are left behind in the Temp-folder even after the browser has been closed.
Http-headers in the response from the server
Cache-Controls: no-cache,no-store,max-age=0,post-check=0,pre-check=0
Content-Type: application/pdf
Content-Disposition: inline; filename="xxxxxxxx.pdf"
Expires: 0
Pragma: no-cache
Folder: [User-folder]\AppData\Local\Temp
Filename-format: PDFxxx.tmp
Browsers: Firefox 3.6, Opera 11, Safari 5
Plugin: Acrobat Reader 10
Simply add a .pdf extension to the file and open again in Acrobat Reader. Since the server has set headers indicating that this PDF should not be stored locally, it is a severe security hole leaving traces of this PDF on the filesystem.
Is this a problem Adobe is aware of? When can we expect this to be fixed?
Regards,
GustavHi Michael,
Thank you for you quick response!
In Acrobat 9, I cannot find the PDFs in the Temp-folder after the browser has been closed.
In Acrobat 10, PDFs are left behind in the Temp-folder even after browser close.
To me, this looks like a bug in Acrobat 10. Would you not agree?
Regards,
Gustav -
Using custom http headers in SOAP sender adapter
Hi,
my problem is exactly the same as reported [here|Re: SOAP Sender - Extract Header Values;] and [here|Variable Transport Binding - Soap Sender;
Basically I'd like to send through the soap sender adapter some custom http headers. I check the necessary options in the advanced tab (set adapter-specific message attributes and variable transport binding), and in the variable header one I put x-StoreCode, which is the same http header I send to PI.
But I won't see anything in the dynamic configuration section when the message is persisted in PI.
Very surprised that I've seen this issue is a common problem others have faced before without success.
Thanks!Hi Michal,
the extra info I'm trying to send separated from the message is an http header, not part of the query string.
If I incorporate the extra info as a parameter to the query string like this, for example:
http://host:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=S1&receiverParty=&receiverService=&interface=Int&interfaceNamespace=urn:test&x-StoreCode=13&nosoap=true
Then I can see the value in the dynamic configuration section:
<SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="SQueryString">senderParty=&senderService=S1&receiverParty=&receiverService=&interface=Int&interfaceNamespace=urn:test&x-StoreCode=13&nosoap=true</SAP:Record>
But what I'm trying to do shoould be possible, according to sap help:
http://help.sap.com/saphelp_nwpi71/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm (section Define Adapter-Specific Message Attributes) -
Encoding problem in call-back to hook URL (post parameters)
Hello all,
I'm encountering a character encoding problem while retrieving the content of the shopping basket from one of our provider.
After the POST request is made by the provider to our system using the hook url, when debbuging I can see that some special characters are represented with the sign '#' (after the call the ITS_IMPORT_CONTEXT).
In our case using the parameter http_content_charset with various values, including UTF-8, did not change the result.
Inspecting the HTTP traffic has highlighted the following: the encoding received from the provider is related to UTF-8, but while we are expecting the hexadecimal values, we are receiving the "Unicode code points", which are not recognized by our SAP system. For more details look at the UTF-8 encoding table found here and compare the values under column "Unicode code point" with the one under column "UTF-8 (hex.)".
As an example, for the character 'é', we are receiving the value "%E9" (the code point) instead of receiving the the hexa value : "%C3%A9".
Do you have any idee if this can be corrected on our side or if the provider must addapt the way it's sending the POST parameters?
Many thanks in advance for you help.
Best regards,
Jerome.Hi Jason,
Indeed I had contacted the provider and informed them about the encoding problem and the fact that passing the parameter http_content_charset had no effect on the sent back encoding.
They have taken into account my request and have changed the encoding used during the request to the HOOK_URL.
Thanks to all of your for your help.
Regards,
Jerome. -
Encoding problem (via ORB)
Hello,
I posted this problem few months ago, but still havent been able to solve this.
I have a Client Server program which communicates via ORB, i.e. using CORBA, with server running on Solaris OS and Client running on windows.
The server returns string containing chinese characters to the client.
However, my chinese characters dont appear properly on the client side.
If i run the client on the Solaris OS there is no problem with it.
I tried converting the encode of the string by getting its byte and creating
a new string with encoding parameter. None of this seems to work.
I can see the chinese character when the server is writing to OutputStream of CORBA, but on the InputStream of CORBA it does not
show properly.
Any ideas on how i can overcome this encoding problem where the C/S is
communicating via CORBA (ORB)?
Thanks in advance.Thanks for your reply
Yes, i know the BIG5 is for Traditional Chinese and japansese is using like Shift-JIS or EUC.
So when i try to post japanese in a BIg5 web page, i think it's normal that i can't see it in BIG5 encoding.
But then i change the Safari default decoding to BIG5 HKSCS, the japanese appers! At the same time i can see the traditional chinese too!
And if i use Firefox, i can both see the japanese and chinese at the default BIG5 encoding.
So i simple think maybe safari translate my japanese into BIG5 HKSCS,not Shift-JIS. But if i use Firefox, i can get the same result with only BIG5 encoding, not BIG5 HKSCS. So i am just wondering why it's different between Safari and Firefox with the same BIG5 encoding.
Following is a example URL
It's a MAC discussing froum with BIG5 encoding in Taiwan.
http://ubb.frostyplace.com.tw/viewtopic.php?t=19162
It's a froum topic posted by me. I input some japanese into this topic
If you browse this page with Safari BIG5 encoding, you can see a lot of question mark instead of the original japanese word that i and other people posted.
But if you change the encoding to BIG5 HKSCS, the japanese appears. And if you using Firefox with BIG5 encoding, the japanese appears too.
So is it someing wrong with Safari's BIG5 encoding or some other reason makes this happen? -
I'm using Jdeveloper version 11.1.2.1. I have a encoding problem when creating View Object based on a query. This is my query:
select id, DECODE(id,'11','Индивидуално,'13','Semejno','14','Grupno') naziv
from ins_type
where class_id = '14' and id in ('11', '13', '14')
It is a simple LOV query with cyrilic letters. When I save the ViewObject and re-open it im getting question marks(???????) instead of the cyrilic letters. This only happens in the view object. I dont have other encoding issues when working with cyrilic letters only when im trying to build a View Object based on a query that has cyrilic letters. If i read those values from the database everything is fine
Thanks,Change the encoding of your application to UTF-8 which appears to be sufficient for cyrilic chars. Here is a quick guide on how to do this http://docs.oracle.com/cd/E17984_01/doc.898/e14693/appa_configuring_jdev.htm
You may also need to update any pages that have encoding explicitly set -
Hi.
I discovered my Firefox v26 was SOMETIMES trying to send multiple requests on port 7070 (ukrainian ip-address) independently on what websites were opened at the moment.
The problem remains after v27 update.
I have an addon "live http headers" installed.
As I manually allow the request by firewall nothing appears in the headers window.
Does my firefox seem to be modified with adware/spyware?Have you tried Opening your Firefox in Safe Mode
[[Troubleshoot Firefox issues using Safe Mode]]
please report back to us -
I'm trying to URLDecoder.decode an url with accented characters, but it's not working:
For example with the "?" character:
URLEncoder.encode("?","UTF-8"); results in: %C3%B6
However, when I URLDecoder.decode my url, (http://localhost/mjszotar/keres?szo=%C3%B6), the result is: ??
Can you help me find out the problem please?I have tried with the Character Encoding option
URLDecoder.decode("http://localhost/mjszotar/keres?szo=%C3%B6","UTF-8");
output:
http://localhost/mjszotar/keres?szo=?
URLDecoder.decode("http://localhost/mjszotar/keres?szo=%C3%B6","ISO-8859-1");
output:
http://localhost/mjszotar/keres?szo=?? -
PHP charater encoding problem.. i think
Hi,
IF I post a message through my form containing the Danish
characters " �
� � " and read it in my email client (TB 1.5 or
OE) it has turned into
this " ������ "
instead of the � (or æ), � (or oslash;),
� (or
å).
Does anybody know why? I know it must be a encoding problem
and I tried
to send a php header bore anything else but still no go.
I'll appreciate any help.
Thanks
KimThanks both of you. I'm not quite sure about this "To control
the
encoding of an email sent by the PHP mail() function, you
need to add an
additional header in the fourth argument to mail()."
This is the form...
<?php
if(isset($_POST['Submitted'])) {
$Errors = Array();
if(!trim($_POST['navn'])) $Errors[] = "Indtast venligst for
og
efternavn";
if(!preg_match("/[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9]{2,4}/",$_POST['email']))
$Errors[] = "Indtast venligst en gyldig e-mail ";
if(!trim($_POST['kommentar'])) $Errors[] = "Kommentar";
if(strtolower(trim($_POST['spamtrap'])) != "syv") $Errors[]
= "Stav
tallet 7 med bokstaver - (syv)";
if(!count($Errors)) {
$SendTo = "[email protected]";
$Subject = "mail fra hjemmesiden";
$FromString = "Fra: ".$_POST['email']."\r\n";
$additionalHeaders = "Content-Type: text/plain;
charset=utf-8\r\n";
$Indhold = "Der er blevet sendt flg. oplysninger:\r\n\r\n";
$Indhold .= "Navn: ".$_POST['navn']."\r\n";
$Indhold .= "Email: ".$_POST['email']."\r\n";
$Indhold .= "Telefon nummer: ".$_POST['telefon']."\r\n";
$Indhold .= "Adresse: ".$_POST['adresse']."\r\n\r\n";
$Indhold .= "Postnummer og By:
".$_POST['postby']."\r\n\r\n";
$Indhold .=
"kommentar:\r\n".preg_replace("(\r\n|\r|\n)","\r\n",$_POST['kommentar'])."\r\n";
$MailSuccess = mail($SendTo,$Subject,$Indhold,$FromString);
header("Location:
http://www.lazur.dk/tak.php");
exit;
?>
Is that correct?
Kim
Kim skrev:
> Hi,
>
> IF I post a message through my form containing the
Danish characters " �
> � � " and read it in my email client (TB
1.5 or OE) it has turned into
> this " ������
" instead of the � (or æ), � (or oslash;),
� (or
> å).
>
> Does anybody know why? I know it must be a encoding
problem and I tried
> to send a php header bore anything else but still no go.
>
> I'll appreciate any help.
>
> Thanks
> Kim -
Hi,
How do I set/add the HTTP headers in the webservice soap client(Call object)?
Any pointers/code samples will be of good help.
Regards
KumzaHi,
I have the same problem and I have tried your solution but the problem persists.
The point is that, in my case, getMessage() returns NULL so I cannot set the header.
Any idea or suggestion?
Thank you very much in advance.
Juan -
How to set Custom HTTP headers in HTTP binding?
How to set custom HTTP headers before sending the Rest based request in HTTP binding?
sharon38_74 wrote:
they said that our internal application needs to send a "login request" to etran via SSL with the user's information encoded in base 64 format. etran captures the HTTP header containing user authentication and authorization information, and parses the required information from the HTTP header.
My question is that how I set user information in HTTP header? From my understanding, once I am able to set the user information in HTTP header, it is in base 64 format?Your application need to act like a proxy. You can invoke a HTTP request programmatically using java.net.URLConnection. You can set request headers using URLConnection#setRequestProperty(). Also see the API docs: [http://java.sun.com/javase/6/docs/api/java/net/URLConnection.html]. You only need to know the header field name where to set the Base64-encoded value in. You need to Base64-encode the value yourself.
Maybe you are looking for
-
Oracle configuration in Redwood environment
Hi, We have Redwood 6.02 on Oracle database. We have configured Oracle server as SHARED/MTS server . We are planning to configure it as dedicated server. Please advise whether it is advisable to do it or Redwood recommends a SHRAED/MTS server configu
-
Form Hangs / Browser Closed
We have developed custom forms which are slighly huge in size, too many fields, too many user events etc. When we click certain dropdowns, which has user events, The brower is abruptly getting closed loosing all data entered or form freezes forcing t
-
Advice needed regarding TC set-up
Dear Gang, I want to have a pure 802.11n network using the 5 ghz spectrum and the wide array setting. However, I have one desktop computer that is 802.11g. I'd like to run a 25 ft. Cat 5 cable to one of the LAN ports on the TimeCapsule and then shut-
-
so i just got my new kin two and went on my verizon and tried to black my data so i didnt get charged. i blocked mobile web but didnt see the block all data option. i went bak later that night and saw that i had incured .08mb of data. no big deal i j
-
trying to update from lion to mountain lion already purchased it but says its not available in us store help