freemarker-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Le Roux <jacques.le.r...@les7arts.com>
Subject Re: [FM3] Rename encoding to charset, use Charset instead of String
Date Sat, 25 Mar 2017 07:04:54 GMT
I agree on all points

Jacques


Le 24/03/2017 à 15:50, Woonsan Ko a écrit :
> On Tue, Mar 21, 2017 at 2:39 PM, Daniel Dekany <ddekany@apache.org> wrote:
>> Tuesday, March 21, 2017, 3:31:56 PM, Woonsan Ko wrote:
>>
>>> +1 on both.
>> Furthermore, as the "encoding" parameter of
>> getTemplate/#include/#import was removed in FM3, the
>> locale-to-encoding map (`Configuration.setEncoding(Locale, String)`)
>> was also removed. So now it should just be `charset`, not
>> `defaultCharset` (similarly as we have Template.charset). However,
>> that name is still pretty bad, as it doesn't tell if the charset of
>> what it is. It's the charset of the the template file when we read it.
>> So, maybe, it should be "sourceCharset"?
> Yes, "sourceCharset" helps clarify the meaning, indeed!
>
> Cheers,
>
> Woonsan
>
>>> Woonsan
>>>
>>> On Sun, Mar 19, 2017 at 2:22 PM, Daniel Dekany <ddekany@freemail.hu> wrote:
>>>> We have this retro terminology where instead of charset we say
>>>> encoding. (I understand that encoding has a wider meaning, but we only
>>>> intend to support encoding/decoding via a charset.) So I think
>>>> cfg.setDefaultEncoding and <#ftl encoding=...> and such should be
>>>> renamed to cfg.setDefaultCharset and <#ftl charset=...>.
>>>>
>>>> Also, in the Java API-s we should use Charset instead of a String
>>>> (java.nio.charset.Charset didn't exist when FM 2.3 was created).
>>>>
>>>> --
>>>> Thanks,
>>>>   Daniel Dekany
>>>>
>> --
>> Thanks,
>>   Daniel Dekany
>>


Mime
View raw message