Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When trying to subscribe to a channel named "public" with Meteor, a specialised web server for real-time push using COMET, I get the desired response:


When the http request is:

GET /push/131530959548387383/xhrinteractive/public?nc=1315309595740 HTTP/1.1

But when i try to subscribe to a channel named in english and hebrew such as: "tag-קוקאין" and the http request is:

GET /push/1315309516300999786/xhrinteractive/tag-%D7%A7%D7%95%D7%A7%D7%90%D7%99%D7%9F?nc=1315309516590 HTTP/1.1

I get an akward response - the name of the channel became dots:

<script>ch("tag-............", 0);</script>

The file that is responsible of figuring out the header uses this regex:

        my $persist=$self->getConf('Persist');
        my $maxTime=$self->getConf('MaxTime');
        $self->{'ConnectionTimeLimit'} = ($self->{'ConnectionStart'}+$maxTime) if ($maxTime>0);

        my @channelData=split('/',$3);
        my $channels={};
        my $channelName;
        my $offset;
        foreach my $chandef (@channelData) {
            if($chandef=~/^([a-z0-9_\-\%]+)(.(r|b|h)([0-9]*))?$/i) {
                $channelName = $1;
                $channels->{$channelName}->{'startIndex'} = undef;
                if ($3) {
                   $offset = $4;
                   if ($3 eq 'r') { $channels->{$channelName}->{'startIndex'} = $offset; }
                   if ($3 eq 'b') { $channels->{$channelName}->{'startIndex'} = -$offset; }
                   if ($3 eq 'h') { $channels->{$channelName}->{'startIndex'} = 0; }

I might add that Meteor is a comet server of it's own. it's purpose is to push notifications in real time:

There has to be a fix for this somewhere.. i tried searching everywhere with no avail. I will be grateful if someone will point me to some direction.

share|improve this question
up vote 0 down vote accepted

It would help if you linked to a page describing what Meteor is - RSS reader, application, web server?

And provide some details, e.g. does Meteor claim to support UTF-8, and have you configured it to do so? Also what platform are you on, and is this a client or server app?

The first character (%D7%A7) in the 2nd URL given above is the UTF-8 encoding (D7 A7) of this Hebrew character - probably what's happening is that the GET is being correctly encoded in UTF-8 (the default for modern browsers and client apps), but the response either is not valid UTF-8, or the client application doesn't recognise it as UTF-8.

Update 1:

  • The code looks like Perl, which does have Unicode support, but Unicode-enabling a Perl application is not always a simple task. However it is possible to do it in portions e.g. just have that regex $chandef=~/^([a-z0-9_\-\%]+)(.(r|b|h)([0-9]*))?$/i match a UTF-8 alphanumeric etc string - see the Encode CPAN module and similar encode/decode builtins, as long as you are using Perl 5.8+ and preferably 5.10+. Any time you see [a-z] in code, it's a red flag for internationalisation and Unicode. This is turning into a StackOverflow answer so I'll stop there...
  • You haven't answered my 2nd and 3rd questions but the code makes it clear that Meteor won't support UTF-8 without some code changes.
  • You really need to talk to the Meteor developers as this is quite specific to this server, see
share|improve this answer
Thanks @RichVel for responding and sorry for that, i have edited the question. – Tom Sep 6 '11 at 12:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.