Sha256: 0bdb38aa14f0956c3f1d5b632151e5df3fe5572cd460c8cf183db891bd3f762a
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
# Copyright (C) 2005-2006 Laurent Sansonetti # # Alexandria is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Alexandria is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public # License along with Alexandria; see the file COPYING. If not, # write to the Free Software Foundation, Inc., 51 Franklin Street, # Fifth Floor, Boston, MA 02110-1301 USA. require 'glib2' class String # Converts this string into the desired charset. # # Note that this may raise a GLib::ConvertError if the # desired_charset cannot accommodate all the characters present in # the string, e.g. trying to convert Japanese Kanji to ISO-8859-1 # will obviously not work. def convert(desired_charset, source_data_charset) GLib.convert(self, desired_charset, source_data_charset) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alexandria-book-collection-manager-0.6.9 | lib/alexandria/utils.rb |
alexandria-book-collection-manager-0.6.9.pre1 | lib/alexandria/utils.rb |