Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7871703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:59:02+00:00 2026-06-03T01:59:02+00:00

I am using YUI JavaScriptCompressor to compress JavaScript on the fly, and one JavaScript

  • 0

I am using YUI JavaScriptCompressor to compress JavaScript on the fly, and one JavaScript file contains Russian and other languages letters, and apart from that if my current thread culture is set to hr-HR then it changes decimal separator from ‘.’ to ‘,’ !?

Here are the examples, Croatian culture

  Thread.CurrentThread.CurrentCulture = new CultureInfo("hr-HR");
  string js = "var dd = 0.9; var tt = 'Хорватия'";
  string compressed = JavaScriptCompressor.Compress(js);

and value of variable compressed is :

var dd=0,9;var tt=”????????”;

Decimal separator is changed, single quotes are turned into double ones and Russian script is lost. If I set current culture to en-US, then compressed is :

var dd=0.9;var tt=”????????”;

Now decimal separator is unchanged, but all other problems are present, even if I set culture to Russian (“ru-RU”), Russian script is still returned as question marks.

I am totally puzzled, so my question is where can I set Encoding and other options to change that behavior, only thing that I see that can affect this compression is parameters in Compress method but none of that helped.

UPDATE 1

I looked at source and there is a way to set Encoding, but YUI Compressor is still changing my decimal separator, here is the code :

  Thread.CurrentThread.CurrentCulture = new CultureInfo("hr-HR");
  string js = "var dd = 0.9; var tt = 'Хорватия'";
  JavaScriptCompressor jsc = new JavaScriptCompressor(js, false, Encoding.UTF8, CultureInfo.InvariantCulture);
  string compressed = jsc.Compress();

and results are :

var dd=0,9;var tt=”Хорватия”;

Changing culture in 4th parameter to “en-US” didn’t help either.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:59:04+00:00Added an answer on June 3, 2026 at 1:59 am

    It seems that there is a bug in 1.7.0.0 version that I used, when I upgraded to 1.7.1.0 this code works as expected :

      Thread.CurrentThread.CurrentCulture = new CultureInfo("hr-HR");
      string js = "var dd = 0.9; var tt = 'Хорватия'";
      JavaScriptCompressor jsc = new JavaScriptCompressor(js, false, Encoding.UTF8, CultureInfo.InvariantCulture);
      string compressed = jsc.Compress();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Yahoo's Minifier here: http://refresh-sf.com/yui/ I use it to compress CSS and Javascript.
I'm moving some code from YUI to javascript and some of it is using
I am currently using YUI to compress JavaScript files via Ant: <apply executable=java parallel=false>
I am using YUI Compressor to minify Javascript files. However these Javascript files contains
I'm currently using the Rich Text Editor from the YUI framework. But I don't
Problem in YUI:I am using YUI grid,my dataset contains some special character.i bind my
I am using yui-uploader from YUI 2.6.0 When an upload error occurs, I disable
I'm using YUI as javascript framework, and can successfully react when the user changes
How can i compress individual css files using YUI build task (or otherwise). Scenario:
I'm using YUI file uploader based on flash, and the flash requests host/crossdomain.xml file.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.