Code Monkey home page Code Monkey logo

Comments (7)

sunaku avatar sunaku commented on May 24, 2024

I agree, and wmiir does not seem to have this problem:

wmiir xwrite /rbar/0-mpd "label ’"

from rumai.

 avatar commented on May 24, 2024

Hi,

I can confirm this issue. After updating rbar field with an utf-8 character it crashes with the above message in wmiirc.log and also tags switching stops working. I cann't use localised date info or MPD titles/artist names with localised chars.

I suspect it's caused by hardcoded sizes for characters (only ASCII is handled) for communication stream in IXP Rumai module.

Is there a chance this bug/misfeature will be fixed soon ?

from rumai.

sunaku avatar sunaku commented on May 24, 2024

I'm pretty busy these days; feel free to contribute a patch. :)

from rumai.

sunaku avatar sunaku commented on May 24, 2024

I am using ruby 1.9.2p180 and my MPD status applet is able to write Unicode text to the bar label:

>> fs.rbar['0-mpd'].read
"colors #dcdcdc #343434 #444444\nlabel (mpd) \xC3\x98ystein Sev\xC3\xA5g: Consolation\n"

Notice that the UTF-8 characters are expressed as two bytes instead of a single \u{...} compound. Of course, this isn't a solution for the original issue, but it is somewhat puzzling.

>> puts "\xC3\x98ystein Sev\xC3\xA5g"
Øystein Sevåg
nil

>> puts "\xC3\x98ystein Sev\xC3\xA5g".encoding
UTF-8
nil

from rumai.

sunaku avatar sunaku commented on May 24, 2024

The problem was how Ruby 1.9 counts the length of a string: it counts characters, not bytes. I've got an ad-hoc solution working locally but my existing unit tests are failing. I'll push an update once I fix the failing tests.

from rumai.

sunaku avatar sunaku commented on May 24, 2024

Commit e7a9757 fixes this issue.

from rumai.

 avatar commented on May 24, 2024

Finally fixed. Grreeaatt !
Thank goes to sunaku.

from rumai.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.