Cyrillic encoding with getURL

I am creating a swf for use on a Russian website.
I have search box that the customer enters their search term which I then concatenate to the URL string in the getURL method.
When i use western characters this work fine but when i use cyrillic characters it breaks.
Does anyone know a way round this?
Or a way to output the characters using UTF-8?
Code Below
on (release, keyPress "<Enter>")
     if (search_text != "" && search_text != " " && search_text !=  undefined)
        var newURL = "http://www.WEBADDRESS.com/variable="+search_text;
         getURL(newURL, "GET");
'search_text'  variable refers to input field.
Thanks
Matt

I try to do it like this:
this is how I put in in DB:
InputStream in = new FileInputStream(file);
stmnt.setBinaryStream(10,in, (int) file.length());
StringBuffer buff = new StringBuffer("cp1251");
and then I get in the servlet :
response.setContentType("text/plain");
request.setCharacterEncoding("cp1251");
response.setHeader("Content-Disposition", "attachment; filename=\""+ "MyFile" + ".txt\"");
response.getOutputStream().write(File);
response.getOutputStream().flush();
BUT NOTHING HAPPENS !!!! This is a very big shit !!!!! Please,help,guys !!!

Similar Messages

  • Cyrillic encoding,help?

    Hi,Java Masters !!! I am sorry that I post this topic here but I cannot find another appropriate place.
    I'm working on a WebApplication and I have to upload fie.Everything is ok,but after I upload file and try to downloaded the text in the file is encoded :( !!!
    I'm new to Java and this is the my first time that I faced with reality of encoding :( . I need to read the files in Cyrillic and Latin. I used Oracle DateBase where every file is encoded with Win1251.This is how I put the the file in DB:
    InputStream in = new FileInputStream(file);
    stmnt.setBinaryStream(10,in, (int) file.length());
    and this is the code in my servlet which I use to download the file:
    response.setContentType("text/plain");
    request.setCharacterEncoding("UTF-8");
    response.setHeader("Content-Disposition", "attachment; filename=\""+ "MyFile" + ".txt\"");
    response.getOutputStream().write(File);
    response.getOutputStream().flush();

    I try to do it like this:
    this is how I put in in DB:
    InputStream in = new FileInputStream(file);
    stmnt.setBinaryStream(10,in, (int) file.length());
    StringBuffer buff = new StringBuffer("cp1251");
    and then I get in the servlet :
    response.setContentType("text/plain");
    request.setCharacterEncoding("cp1251");
    response.setHeader("Content-Disposition", "attachment; filename=\""+ "MyFile" + ".txt\"");
    response.getOutputStream().write(File);
    response.getOutputStream().flush();
    BUT NOTHING HAPPENS !!!! This is a very big shit !!!!! Please,help,guys !!!

  • File encoded with x264 takes forever to load in Encore CS 5.5

    I use Encore mostly because it takes h.264 video encoded with the x264 compressor, which provides much higher quality than any other compressor. The problem is that these files take forever to load. For example, right now I'm trying to load a video that is about 1 hour and 20 minutes long, encoded at 38 Mbps, and the file is 20.9 GBytes. Now it's 3 PM and I imported this file along with the AC3 file over an hour ago. The Encore process shows as not responding, but when I open the Windows 7 Resource Monitor, in the disk tab it shows that it's reading the video file at a rate of about 45 MB/s, so I didn't kill the Encore process. I know eventually it's going to stop and load the file, but I don't understand why it takes so long. The encoding parameters that I used in x264 are these:
    x264 --level 4.1 --bluray-compat --preset slow --bitrate 38000 --keyint 30 --min-keyint 2 --open-gop --weightp 0 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --rc-lookahead 40 --tff --output "output" "input"
    This comes from a family video that is 1080 59.94i. This time these two parameters appeared because I selected Blu-ray as the target:  --bluray-compat and --open-gop, which I don't normally use, but still, even when I don't use them, video encoded with x264 takes forever to load. Does anybody here know what could be the problem?

    What's weird is last year I encoded a file that was almost two hours long and Encore took it without trouble, although it was CS5, not 5.5. Since I had kept the avs and bat files, and also the x264.exe from that encode, I brought them into the current working folder and I just modified the file names in the avs and bat files to point to the new avi and encode to the new h264 file. So I encoded this file, I imported it into Encore, and it still hangs. Maybe it was a change from CS5 to 5.1 that introduced a problem. x264 has been certified to be Blu-ray compliant since over a year ago, and I already put this file to a Blu-ray with TSMuxer, since it was a family video and I didn't really need menus, and it plays perfectly fine in my Blu-ray player.
    But I'm sure there must be something, one or two parameters that would make it compatible. For example, after encoding the file again the last time, now I can import it into Encore, and it doesn't stay frozen forever, but it doesn't show me the video and as soon as I try to move the timeline cursor it freezes and doesn't let me do anything for several minutes. So still it's not usable. But it's a change from the first encode where the progress dialog would be there for several hours and do nothing at all.

  • Steps to UTF-8 Encoding with Oracle 8i and Weblogic 6.1SP1

    What are the Steps to UTF-8 Encoding with Oracle 8i and Weblogic
              6.1SP1?
              I have:
              - Oracle 8.1.5 database created with character set=UTF8 and national
              character set=UTF8
              - Weblogic 6.1SP1 without any encoding mechanism set
              (though I did play with
              <jsp-param><param-name>encoding</param-name>
              <param-value>UTF-8</param-value>
              </jsp-param>
              in the weblogic.xml for a while though it seemed not to make a
              difference)
              - JSP pages set to content='text/html; charset=UTF-8'
              - JSP form POSTs set to enctype="UTF-8"
              I can copy and paste Chinese Kanji from a UTF8 encoded web page into
              form text boxes but when I post the data it comes back as different
              Kanji. Then once it is posted the Kanji stays the same on repeated
              posts. The same Kanji text also looks different when viewed in a form
              text box than when viewed as straight text on the page.
              Is there anything else? Or am I already encoding characters twice?
              Please help!
              Mel Christie
              

    Hi Experts,
    Please correct me if am asking you the question in wrong way.
    I have ARCGIS with oracle database 10gr2 in production server.
    My work is to connect AUTOCAD S/W (client computer which is connected in LAN) to ARCGIS in order to access the toposheets available in SDE user.
    When iam trying to connect iam getting this error:The specified credentials are not valid or provider is not able to establish a connection.
    I checked the path to production server by pinging and user/passcode too but not helpful.
    Please help me in this , very urgent.
    Thanks.
    Edited by: user13355644 on Jul 3, 2010 3:53 AM
    Edited by: user13355644 on Jul 22, 2011 2:55 AM

  • IF_IXML : How can i add encoding with value UTF-8 to the document object??

    Hi
    i want to create a xml file with the following content:
    <?xml version="1.0" encoding="UTF-8"?>
    <OpenSearchDescription xmlns="http://...."> 
    </OpenSearchDescription>
    i did this with the if_ixml interface and rendered the content in a file 'D:\usr\sap\IFD\DVEBMGS01\log\TEST_out.xml
    <?xml version="1.0"?>
    <OpenSearchDescription xmlns="http://...."> 
    </OpenSearchDescription>
    BUT the document attribut(?) encoding="UTF-8"?> is missing!
    How can i add encoding with value UTF-8 to the document object?? it should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    *here is my coding.
    TYPE-POOLS: ixml.
    CLASS cl_ixml DEFINITION LOAD.
    DATA: lo_ixml           TYPE REF TO if_ixml,
          lo_streamfactory  TYPE REF TO if_ixml_stream_factory,
          lo_document       TYPE REF TO if_ixml_document,
          lo_parent         TYPE REF TO if_ixml_element,
          lo_ostream        TYPE REF TO if_ixml_ostream,
          lo_renderer       TYPE REF TO if_ixml_renderer,
         lv_rc           TYPE i.
    lo_ixml = cl_ixml=>create( ).
    lo_streamfactory = lo_ixml->create_stream_factory( ).
    lo_document = lo_ixml->create_document( ).
    lo_parent = lo_document->create_simple_element( name   = 'OpenSearchDescription'  "root node
                                                    parent = lo_document ).
    lo_parent->set_attribute_ns( name   =  'xmlns'
                                 value  = 'http://....' ).
    *rausrendern in file
    lo_ostream = lo_streamfactory->create_ostream_uri( system_id = 'D:\usr\sap\IFD\DVEBMGS01\log\TEST_out.xml' ).
    lo_renderer = lo_ixml->create_renderer( ostream  = lo_ostream
                                            document = lo_document ).
    lv_rc = lo_renderer->render( ).
    Thanks for help
    Britta

    Use the following code:
    set an document encoding
      l_encoding = l_ixml->create_encoding( character_set = 'UTF-8'
                                            byte_order = if_ixml_encoding=>co_none ).
      l_success  = l_ostream->set_encoding( encoding = l_encoding ).
    create a xml renderer
      l_renderer = l_ixml->create_renderer( document = l_doc ostream  = l_ostream ).

  • F4v encoded with Adobe media encoder CS4 (longer than 71 minutes)

    Hi I don't know if this is the correct place for this post. So apologies me if this is the wrong place.
    Encoding with Adobe Media Encoder CS4 (4.2.0.006 and 4.0 too)
    Source: MOV (DVPAL) longer than 71 minutes
    Dest: F4V (H.264)
    Result: freezed frames and only plays audio at 01:11. Media Player goes crazy and starts showing some diferent parts freeze frames.
    In Quicktime crashes, in VLC the same of MediaPlayer. Sometimes the audio starts to downsampling and sounds like the pitch goes down.
    Totally agree with this other post: http://forums.adobe.com/thread/580391
    (extract)
    I recentlly encoded afew F4V using Adobe Media Encoder Cs4.  MOst of them are working properly but I don't know why, all of my video that are longer than 71 minutes seems to have trouble playing back.  They all Freeze when they reach 71 minutes or if I navigate pass this point.
    thanks and help us please!
    Kik

    Thanks for the interest.
    I'll try to explain all details:
    MacPro 1.1 (mid 2006) under Mac OS X 10.4.11 (Darwin 8.11.1 kernel)
    System files: journaled HFS+ and a unix based NAS (under samba connection)
    I have all material on the NAS and also I make the transcoding over it. Is a simple mov containing DV PAL WIDE interlaced 25fps with stereo audio. typical settings with nothing out of DV PAL standard.
    The version of MediaEncoder CS4: 4.2.0.006 (it happens with older versions too)
    The settings of MediaEncoder are:
    Audio: AAC stereo 44,1 kHz
    Video: F4V. MainConcept H.264, fps like source, profile high, level 4,1. CBR compression.
    The problem only appears with videos longer than 71 minuts. At 01:11 starts with crazy problems. It seems like the player have some read or problems.
    Tell me if you need some other kind of information.
    thks

  • Quadrature encoder with a non-NI board

    I am attempting use an encoder with a non-NI board (Measurement Computing) and I am unsure how to interface the encoder output from the board with LabView. I have the VIs for the board which allow the board to interface with LabView,. I essentially need a VI to decode the quadrature, the ones in the tutorials were not very helpful or insightful.

    Hello Mystery,
    Take a look at the section “Velocity and Acceleration Calculations” in this devzone.  While the article itself applies to CompactRIO, the equations used in the above section can help you determine how to convert the counter output into a velocity measurement. 
    Does the counter value increase when you rotate the encoder in one direction and decrease when you rotate in the other direction?  This is essentially position measurement.  By knowing the number of ticks per revolution as well as the starting position of the encoder, you can determine the current rotation position.  For velocity, there is a little more to the measurement.  The concept relies on taking a counter measurement in a periodic manner.  Then you can use the number of encoder pulses that have occurred over that period of time to calculate velocity.  The document I linked about shows how to convert the number of encoder pulses over a fixed period of time into RPM which can be later converted into angular velocity.  Hope this helps. 
    Regards,
    Browning G
    FlexRIO R&D

  • Reading simulated encoder with 6602

    Hello!
    I'm trying to read quadrature encoder (to be more specific this is an output of the pulse train generator that simulates the encoder).
    In the attached picture you can see how the signal that i'm trying to read.
    I need an advise about the correct filter settings.
    Please also see the attached vi.
    Usefull data:
    Labview 8.2.1
    Capturing device PXI-6602.
    The Encoder is 16384 pulses. (If the reading is x4, i should get 2^16 - 65536 ticks).
    The Encoder has differential outputs, but i've connected only A,B and Z.
    The rotating speed is up to 5000 rpm. You can see in on the picture. (16384*(5000/60)=1,365,333MHz).
    There is no problem to read the encoder with another devices, i have a motion analyzer from Control&Robotics solution and it works great.
    Thank you.
    Elman Izia.
    001.jpg (78 kb)
    Position capture.vi (171 kb)

    Hi Elman,
    The filter clock is used to make sure that your signal has
    integrity and eliminates glitches.  In
    order for signal to be counted, it must remain high for two consecutive periods
    of your filter clock.  There are five
    time bases (5us, 1us, 500ns, 100ns and programmed) that can be used as your
    filter clock.  The programmed clock can
    be created by another counter and this setting will let a signal be counted if
    it is at least twice times the filter period.
    This is a great method to help eliminate errors that can be
    introduced by noise, crosstalk or transmission line effects.
    The TimebaseSrc property is going to select a clock to be
    used as the source.  In your example that
    property is correct, you would want to use the 80MHz clock.  The TimebaseRate property is going to be used
    to divide the clock down to specific frequency. 
    It will divide the master clock down by an integer value and round it to
    get a rate that is as close to the value entered.  I would recommend leaving this number as
    80MHz. 
    The MinPulseWidth property is going to determine the clock
    of the filter clock.  This property is
    going to use the TimebaseRate property to create the predefined filter clock
    settings.  If your signal stays high for
    two consecutive periods of the minimum pulse width, then it will be counted. 
    You need to determine the minimum pulse width that is
    acceptable for your application.  Since
    your signal has a pulse width of about 360ns, you might want to use the
    predefined filter clock of 100ns.
    In short, you are creating a digital filter that will only allow
    a signal to be recognized if it remains high for two consecutive pulses.
    For further explanation, refer to the PCI/PXI–6602 User
    Manual page 3-20.
    http://www.ni.com/pdf/manuals/322137a.pdf
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments

  • Payload type of wav files encoded with gms codec

    Hello everybody,
    I have an application which receives and plays alaw formated wav files using JMF(with the help of some additional libraries) . I want to use lower bandwidth for my application. A quick google search indicated that i can do this by using gsm format.
    I have 2 questions:
    1-) what are the differences between .gsm files and .wav files which are encoded with gsm codecs? Which one's quality is better? which one's compression ratio is better?
    2-) which payload type should i use for wav files which are encoded with gsm codecs?
    In [Rtp Payload list|http://www.iana.org/assignments/rtp-parameters] page, there is a gsm entry whose payload is 3. I suppose that is for files with gsm extension. I tried it but it didn't work with my wav sample (as u can guess it was encoded with gsm 6.10 codec)
    Any suggestion is appreciated. If you have a comment about the main problem (which is using lower bandwidth for sending audio data) i would also like to hear it
    Thanks in advance
    btw i also tried this [gsm sample|http://www.nch.com.au/acm/sample.gsm] with payload 3.At first it worked but then strangely it played just static. In Sun's page it says gsm format is supported. I played both ulaw and alaw succesfully so i wonder what i am doing wrong. Do we need to tell the player that it is going to receive data in gsm format? I didnt do such a thing for u-law and a-law formats...
    Edited by: Bugra.Hasbek on Nov 10, 2008 1:18 AM

    Bugra.Hasbek wrote:
    Hello everybody,
    I have an application which receives and plays alaw formated wav files using JMF(with the help of some additional libraries) . I want to use lower bandwidth for my application. A quick google search indicated that i can do this by using gsm format.
    I have 2 questions:
    1-) what are the differences between .gsm files and .wav files which are encoded with gsm codecs? Which one's quality is better? which one's compression ratio is better?I would imagine they are the same...
    2-) which payload type should i use for wav files which are encoded with gsm codecs?I would imagine 3...
    In [Rtp Payload list|http://www.iana.org/assignments/rtp-parameters] page, there is a gsm entry whose payload is 3. I suppose that is for files with gsm extension. I tried it but it didn't work with my wav sample (as u can guess it was encoded with gsm 6.10 codec)
    Any suggestion is appreciated. If you have a comment about the main problem (which is using lower bandwidth for sending audio data) i would also like to hear itMy suggestion would be not to worry about so much stuff. JMF does all of this for you automaticlly.
    On the sender side, make your processor take in whatever kind of supported file you want. Set the processor to output your GSM mono, and then you can just use a Player to play it on the other side. It's really not very different than the examples...
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVTransmit.html]
    When you're programming the tracks, and you're calling "setFormat" on them, just set their format to be gsm.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html] should be able to play this out of the box...

  • How can I watch video encoded with 10-bits color depth correctly via Adobe Flash Player?

    When I watching video on a site, one of those video said it is encoded with 10-bits color depth and require Flash Player 10.2+ and non-trident browser to watch it correctly , but with the latest flash player available installed and ising the Firefox, why I still found green vertical bands over the video which is a sign of improper rendering? How can I fix it? Platform using: android 2.3.6 with Texas Instruments OMAP4430.

    http://forums.adobe.com/message/6115370#6115370

  • Jerky encoding with UscreenCapture

    I have Abobie Flash Encoder 2 and have jerky video on all
    encoding. I use UscreenCapture as a capture device. I can run up
    the stream to 1000kbps and still have jerks on pans. This renders
    all videos unusable.
    This may be a problem with UscreenCapture but I have smoth
    playback on the output window.
    I have changed settings to best framerate.
    MAchine Windows Xp 3.2 ghz with 1 gig ram nvidia 7300
    sample here www.whatsignal.com/flash/flvplayer.html
    I don't know how to fix it unless maybe I need a different
    screen capture utility.

    Well I find this filter is quite good in 'masking' block artifact that codec like xvid, or other low compression codec have. I only apply it if I find the block artifact is too much and I find this filter is less offending to my eyes than the block artifact.
    In manual it said that if you have noisy video and want to lower the size then you can use this filter. It also blur the video a bit. But I suspect it is more than blur as I try gaussian blur in time line and the result is not as good. You can see the result as well. There is the tab between source and target and you can compare the result by togling between source and target tab.
    BTW, anyone with 1 core, dual, or quad core, can you tried to encode with it? Just cancel it after few minutes as I want to see what is your processor utilization with this filter on. Also you can see how long does it take to process this video from the 'estimation time left'.

  • Psadmin list-dp : xml output is encoded with environment locale encoding

    I am building some scripts to help me administer desktop profiles, providers jsp files, and others. Thoses scripts use the psadmin command.
    I have hit what seems to me an unexpected behavior, when trying to download a desktop profile from a script :
    the list-dp psadmin command output is encoded with the current environment locale encoding.
    I suppose almost all psadmin commands localize and encode output as well, but in this case it is annoying : list-dp fails to output a valid xml file when xml header stated encoding (which is left untouched) and current locale encoding differ.
    I have found a simple workaround which involve setting the environment locale to a fixed value, but I would like to know if this problem is known, and if it will be corrected (if it is not already) ?
    My portal version is 7.0 with patch 121913-01,
    the host system is SunOS 5.10 on a sparc host (v240).
    Best Regards

    Well, I have found the answer to my question :
    The Sun Java System Portal Server 7.1 Release Notes bugs section refers to bug #6502307 and gives a workaround.
    Here is the link to release note :
    http://docs.sun.com/app/docs/doc/819-4986
    and to bugs section :
    http://docs.sun.com/app/docs/doc/819-4986/6n73o6vk6?a=view

  • HTML encoding with JTextPane

    hello,
    I'm using JTexPane to edit rich text in my application.
    I set the editorkit with
    pane.setEditorKit(new HTMLEditorKit());
    and I create a new document for editing with
    pane.setDocument(pane.getEditorKit().createDefaultDocument());
    but when I enter text in the pane with accent like "j'ai mang� une pomme" , the method pane.getText() return my html document encoded with ISO-10646 aka Unicode where the "�" is &#233;
    I try to create the editorKit for the ContentType "text/html; charset=UTF-8" but it doesn't work.
    How can I change the encoding to UTF-8 ?
    Please help me ...

    hello,
    I know your problem (i'm french), but i don't know how to resolve it easily.
    you can get the HTML code by using
    pane.getText();and change manually characters...

  • Passing get or post parameter with getUrl()

    Hello I need to pass get or post parameter with getUrl, the
    help say that:
    firstName = "Gus";
    lastName = "Richardson";
    age = 92;
    getURL("
    http://www.macromedia.com",
    "_blank", "GET");
    but it dosen't work! I dont anderstan where I have to tell to
    getUrl wicht variavle it have to send in the get? Where can I tell
    to the getUrl function, the variables to send are firstName,
    lastName and age, per example?
    Thanks, can you

    I want to send the variables to an html page, but I don't
    know how to do this? Can you help me please?

  • No option to encode with Surcode 5.1 in h.264 codec?

    My Premiere and AME are both updated to 4.0.1. I'm trying to encode with multi-channel to an Apple TV compliant h.264 (non-bluray) file. The audio encoding allows multi-channel AAC (which I believe may be unrecognizable by my receiver), but not an option for the Surcode AC3 codec. Surcode is available under h.264 blu-ray and MPEG-2 DVD, but is not an option under the normal h.264. How can I encode a multi-channel audio track for an Apple TV? (The blu-ray option does not allow me to pick my required resolution of 960x540 29.97 fps). And is this $300 plug-in my only multi-channel option?

    i would just encode the files seperatly. Do an audio only encode for the Surcode, then export the Video H.264. Thats what I did and it worked great.
    My problem was that the ac3 file was still only 2 channels....

Maybe you are looking for

  • I CAN NOT OPEN THE DOCUMENT PAGE IN CS5 IN NEW DOCUMENTS

    I USE PHOTOSHOP CS5  on my mac pro snow leopard. I have a trial edition down loaded and worked once. Now it will not open a new or saved documents  or display any pasteboard. The tool bar and basic set up display. Could I have something turned off to

  • How do I ship to a different address?

    My billing address is in Japan, and I want to send the book to the UK. In the drop down menu for shipping address, there is only Japan? How can I put a different destination in the shipping address section. Thanks

  • Will this kill my hard drive even further?

    Hi, My MacBook hung on me the other night and I heard clicking from inside it. I forced a shut down, but the machine would not reboot (other than to a blinking ? icon) which leads me to believe the hard drive is dud. If I have to, I will pay a drive

  • WAP54G through a Windows 7 computer

    I have a windows 7 computer with 2 ethernet ports. I use one to connect to the internet. Can I connect a WAP54G to the other port and use it as an access point for other wireless devices? If so how is it done? Thank You Bob

  • Is there any way to transmit live video other than RTP

    hi since RTP will be blocked by firewalls in many org/places, is there any other way to transmit live video in an efficient way. if so plz help me rgds -venkat