+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 21 to 40 of 46

[Release] Meizu Playlist Converter

This is a discussion on [Release] Meizu Playlist Converter within the Technical forums, part of the miniPlayer M6 / SL category; Unique, you should encode text to UTF8. It's a unicode-ish thing, and the first 128 characters are the same as ...

  1. #21
    Senior Member
    Join Date
    Aug 2007
    Location
    Hungary
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Unique, you should encode text to UTF8. It's a unicode-ish thing, and the first 128 characters are the same as ASCII, that's why it will work for English, but if you don't do the encoding for UTF8, then the passero described problem may arise.
    There should be some function in Python to encode the text as UTF8.

    Just ignore this if I said something you already knew

  2. #22
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Will look into it, thanks for the advice. But first i gotta get my main PC working again, now i've learned that cheap C2D CPUs are cheap for a reason.

    I'm now on my old Portege 4000 lappy and there's not a single line of Python code here, and i don't feel like writing everything from scratch.

  3. #23
    Junior Member
    Join Date
    Oct 2007
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Now i've understood what's the problem. It would be fantastic if you could solve it. However, your program is excellent. Many Thanks!

  4. #24
    Freshman
    Join Date
    Sep 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow thank you. I'm gonna try it . :D

  5. #25
    Stalker
    Join Date
    Jan 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do you have the straight Python available? I am using Fedora 8. Python everywhere!

  6. #26
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Snort View Post
    Do you have the straight Python available? I am using Fedora 8. Python everywhere!
    Quote Originally Posted by Th3_uN1Qu3 View Post
    Will look into it, thanks for the advice. But first i gotta get my main PC working again, now i've learned that cheap C2D CPUs are cheap for a reason.

    I'm now on my old Portege 4000 lappy and there's not a single line of Python code here, and i don't feel like writing everything from scratch.

    So at the moment, no. But i'll try to get to another computer where i can use my HDD and get the source files.

  7. #27
    Passing By
    Join Date
    Aug 2007
    Location
    Rotterdam, Holland
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It works, weeeeeee! Great job dude!

  8. #28
    Freshman
    Join Date
    Mar 2008
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Th3_uN1Qu3 View Post
    So at the moment, no. But i'll try to get to another computer where i can use my HDD and get the source files.
    That would be cool as a Linux version would be sweet :D

  9. #29
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Got my main machine fixed a few months ago, but had some other stuff to do in the meantime.

    So is anyone else interested in this project anymore? I don't have my Miniplayer anymore as its USB port broke, but i can keep developing this little app if needed. There were a few more things i wanted to implement.

    Python source added to first post. There you can see a very good example of working crappy code.
    Last edited by Th3_uN1Qu3; 05-13-2008 at 09:31 AM.

  10. #30
    Junior Member
    Join Date
    Oct 2007
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Th3_uN1Qu3 View Post
    So is anyone else interested in this project anymore? I don't have my Miniplayer anymore as its USB port broke, but i can keep developing this little app if needed.
    I'm yet interested. I hope you can solve my problem improving the function to encode to UTF8 as Speeder has said:

    Quote Originally Posted by Speeder View Post
    Unique, you should encode text to UTF8. It's a unicode-ish thing, and the first 128 characters are the same as ASCII, that's why it will work for English, but if you don't do the encoding for UTF8, then the passero described problem may arise.
    There should be some function in Python to encode the text as UTF8.
    It would be great, cause now i must edit the playlist after the conversion with notepad, and then manually change the non english characters to make it works.

  11. #31
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by passero View Post
    I'm yet interested. I hope you can solve my problem improving the function to encode to UTF8 as Speeder has said:

    It would be great, cause now i must edit the playlist after the conversion with notepad, and then manually change the non english characters to make it works.
    I tried to do it a while ago but gave up, Unicode in Python is pretty hard to do. I will give it another go, but right now i have some important tests to pass at school, it'll have to wait till the weekend.

  12. #32
    Senior Member
    Join Date
    Aug 2007
    Location
    Hungary
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually, unicode is a different thing. It's a table of values-to-characters association with a fixed size. Most often this is a fixed two-byte value.
    UTF8 is an... optimization of the unicode system perhaps, with a variable character length. The first 128 characters work just as the ASCII character set. In 1 bytes. More special characters take 2 or 3 bytes length. In most current programing languages/environments, you should be working with unicode strings (Well... no I'm not sure at all ). When you've got a string in your program, you would need to encode it to UTF-8, and then write the encoded data to disk.

    Anyways! Point is the point, here's some tutorial for you: How to Use UTF-8 with Python
    Google is a programer's best friend .wysiwyg { background-attachment: scroll; background-repeat: repeat; background-position: 0% 0%; background-color: #f5f5ff; background-image: none; color: #000000; font-family: Verdana, Arial, Arial; font-style: normal; font-variant: normal; font-weight: 400; font-size: 10pt; line-height: normal } p { margin: 0px; }
    Last edited by Speeder; 05-20-2008 at 09:18 AM.

  13. #33
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the link, but i had read that already. And it doesn't work. Trying to read the playlist file with codecs.open only brings garbage, garbage and more garbage.

    Because the english playlist file, with no special characters, is saved in ASCII. UTF-8 uses different representations for everything, therefore reading an ASCII file in UTF-8 makes a really big mess. I've tried.

    The alternative would be detection of the charset on file open and running the appropriate code. I'll have to double the number of lines of already craptacular code. Great.
    Last edited by Th3_uN1Qu3; 05-21-2008 at 05:17 PM.

  14. #34
    Senior Member
    Join Date
    Aug 2007
    Location
    Hungary
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts
    uuuummmm... All UTF-8 files have a special leading marker that shows that's a UTF-8 encoded file.
    To be precise, it is the character sequence: "".
    (UTF-16's sequences are FFFE or FFEF, depending on what order the bytes are in 1-1 character - big endian or little endian)
    As for getting garbage... hhhmmmmm... Sounds like something's not good. All English characters and numbers should be the same in ASCII and UTF-8.
    UTF-8 - Wikipedia, the free encyclopedia

    P.S.: Error, I'm using Opera, why's it always adding asterisks into my messages and that strange wysiwyg css tag? I use both the quite and advanced post editors and still. Only when I edit my post..wysiwyg { background-attachment: scroll; background-repeat: repeat; background-position: 0% 0%; background-color: #f5f5ff; background-image: none; color: #000000; font-family: Verdana, Arial, Arial; font-style: normal; font-variant: normal; font-weight: 400; font-size: 10pt; line-height: normal } p { margin: 0px; }
    Last edited by Speeder; 05-22-2008 at 09:27 AM.

  15. #35
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm using Opera too. Not getting any weird chars inserted. Are you using the beta version? If you are, revert to the stable release.

  16. #36
    Senior Member
    Join Date
    Aug 2007
    Location
    Hungary
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm using 9.26.

  17. #37
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    9.27 here.

  18. #38
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm still fighting computer trouble so i can't do much about this piece of software right now.

    My THIRD 8600GT video card just died, and i got tired of going to the store to get it replaced under warranty and running 2 weeks on my old crappy X300SE, so i bought a HD3870 today. It keeps hanging in games, may be DoA. Crap...

  19. #39
    Stalker
    Join Date
    Jun 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Does this converter work for converting windows media player playlists?

  20. #40
    Member
    Join Date
    Dec 2007
    Location
    Bucharest, Romania
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jkurzner View Post
    Does this converter work for converting windows media player playlists?
    As long as you choose M3U in the Save As box when you save your playlist, yes.

    News: I've bought a Seasonic power supply as i thought my old Spire was the problem as it was getting very hot, still no go. Will bring the HD3870 back to the store on Monday... But recent testing reveals it's probably the RAM. Errors in the last megabyte of the 2GB, that explains why i don't get any problems in windows or smaller games. Well, RAM is cheap.

    I've started work on unicode support, i got the files to read something else than garbage but i'm stuck. Some of the commands i used to read the files (ie: readlines()) don't work properly in Unicode. Anyone care to explain why?
    Last edited by Th3_uN1Qu3; 06-17-2008 at 11:13 PM.


 

Similar Threads

  1. How do you organize playlist in the Meizu M6
    By newbielives in forum General Chat
    Replies: 16
    Last Post: 02-26-2008, 06:56 PM
  2. Meizu m8 Release Date
    By Kasaki in forum General Meizu M8
    Replies: 9
    Last Post: 11-27-2007, 03:53 PM
  3. Meizu To Release Speaker Dock For M6
    By Err0r in forum Meizu News
    Replies: 23
    Last Post: 09-11-2007, 11:32 AM
  4. meizu release dates
    By moogle301 in forum General Meizu M6
    Replies: 4
    Last Post: 05-05-2007, 08:52 PM
  5. 8GB M6 on March 1st, Meizu M3 Release Shaky
    By Err0r in forum Meizu News
    Replies: 66
    Last Post: 03-26-2007, 06:32 PM