Yes, I don't believe it should be returning `UTF8String` or `ASCIIString`, 
if the inputs were `UTF16String` or `UTF32String`, something I'd like to 
work on in the future.

On Sunday, July 26, 2015 at 6:53:50 AM UTC-4, Michael Louwrens wrote:
>
> Aah... Well at least it gives utf8 when you have a non-ascii symbol in the 
> string. Thanks for pointing me to why this is happening!
>
> On Sunday, 26 July 2015 12:39:15 UTC+2, Scott Jones wrote:
>
>> I really don't think this has anything to do with Julia's promotion 
>> rules, but rather, the way the `string` function works (and `x*y` where x 
>> and y are strings is really just `string(x,y)`)
>>
>> On Sunday, July 26, 2015 at 6:37:01 AM UTC-4, Michael Louwrens wrote:
>>>
>>> I noticed that this also happens:
>>> julia> x =utf16("string 1")
>>> "string 1"
>>>
>>> julia> y = utf8(" string2")
>>> " string2"
>>>
>>> julia> println(typeof(x), "\t", typeof(y),"\t" ,typeof(y*x))
>>> UTF16String     UTF8String      ASCIIString
>>>
>>> It seems Julia is always promoting to the simplest type that 
>>> can represent the string. It seems that this was an intentional choice.
>>>
>>

Reply via email to