Returns the current character set. The default value can be overridden by setting the LANG environment variable or by overriding this method. In Ruby 1.9 you can also modify this value by setting Encoding.default_external.

# File 'lib/yard/templates/helpers/html_helper.rb', line 57defhtmlify(text,markup=options.markup)markup_meth="html_markup_#{markup}"returntextunlessrespond_to?(markup_meth)return""unlesstextreturntextunlessmarkuphtml=send(markup_meth,text).dupifhtml.respond_to?(:encode)html=html.force_encoding(text.encoding)# for libs that mess with encoding
html=html.encode(:invalid=>:replace,:replace=>'?')endhtml=resolve_links(html)unless[:text,:none,:pre,:ruby].include?(markup)html=parse_codeblocks(html)endhtmlend

# File 'lib/yard/templates/helpers/html_helper.rb', line 294deflink_object(obj,title=nil,anchor=nil,relative=true)returntitleifobj.nil?obj=Registry.resolve(object,obj,true,true)ifobj.is_a?(String)iftitletitle=title.to_selsifobject.is_a?(CodeObjects::Base)# Check if we're linking to a class method in the current
# object. If we are, create a title in the format of
# "CurrentClass.method_name"
ifobj.is_a?(CodeObjects::MethodObject)&&obj.scope==:class&&obj.parent==objecttitle=h([object.name,obj.sep,obj.name].join)elsifobj.title!=obj.pathtitle=h(obj.title)elsetitle=h(object.relative_path(obj))endelsetitle=h(obj.title)endreturntitleunlessserializerreturntitleifobj.is_a?(CodeObjects::Proxy)link=url_for(obj,anchor,relative)link=link?link_url(link,title,:title=>h("#{obj.title} (#{obj.type})")):title"<span class='object_link'>"+link+"</span>"end

# File 'lib/yard/templates/helpers/html_helper.rb', line 358defurl_for(obj,anchor=nil,relative=true)link=nilreturnlinkunlessserializerreturnlinkifobj.is_a?(CodeObjects::Base)&&run_verifier([obj]).empty?ifobj.is_a?(CodeObjects::Base)&&!obj.is_a?(CodeObjects::NamespaceObject)# If the obj is not a namespace obj make it the anchor.
anchor=objobj=obj.namespaceendobjpath=serializer.serialized_path(obj)returnlinkunlessobjpathrelative=falseifobject==Registry.rootifrelativefromobj=objectifobject.is_a?(CodeObjects::Base)&&!object.is_a?(CodeObjects::NamespaceObject)fromobj=ownerendfrom=serializer.serialized_path(fromobj)link=File.relative_path(from,objpath)elselink=objpathendlink+(anchor?'#'+urlencode(anchor_for(anchor)):'')end