# Funny characters in file names

**URL:** <https://www.ruby-forum.com/t/funny-characters-in-file-names/127203>\
**Category:** Rails\
**Created:** [January 26, 2008, 5:16am UTC](https://www.ruby-forum.com/t/funny-characters-in-file-names/127203 "2008-01-26T05:16:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a3d4f5/32.png) [@anti](https://www.ruby-forum.com/u/anti)\
**Post date:** [January 26, 2008, 5:16am UTC](https://www.ruby-forum.com/t/funny-characters-in-file-names/127203/1 "2008-01-26T05:16:22Z")

</div>

def file\_tail (file, offset)  
56 f=File.new(file)  
f.seek(-offset,IO::SEEK\_END)  
f.read  
end

def get\_tags file  
file\_tail(file, 128)  
end

using these def to get ID3 data

works well till it encounters this  
Äîðîãàÿïðîïàæà.mp3

56 :in ‘initialize’ : Invalid argument - c://///Äîðîãàÿïðîïàæà.mp3  
(Errno::EINVAL)

---

<div class="post-metadata">

**Author:** ![anti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a3d4f5/32.png) [@anti](https://www.ruby-forum.com/u/anti)\
**Post date:** [January 26, 2008, 5:39am UTC](https://www.ruby-forum.com/t/funny-characters-in-file-names/127203/2 "2008-01-26T05:39:44Z")

</div>

in addition, the id tags in the files are in english, but i can not  
get to them because of the file name.
