IDN Forums - Internationalized Domain Names  
Home | Advertise on idnforums | Premium Membership

Go Back   IDN Forums - Internationalized Domain Names > IDN Discussions > General Discussion

General Discussion Feel free to talk about anything and everything in this board.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 4th June 2014, 09:11 AM
Member
 
Join Date: May 2009
Location: England
Posts: 371
iTrader: (0)
Rep Power: 857
andre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished road
Swift - Unicode Variables/Constants Names

Just been informed by https://twitter.com/ArmstrongAtWork that Swift (Apple's new Programming Language) Variables & Constants names can be formed from Unicode chars.

Here is a relevant extract from Apple's Swift Language Guide
https://developer.apple.com/library/...TheBasics.html

Quote:
You can use almost any character you like for constant and variable names, including Unicode characters:

let π = 3.14159
let 你好 = "你好世界"
let = "dogcow"

Constant and variable names cannot contain mathematical symbols, arrows, private-use (or invalid) Unicode code points, or line- and box-drawing characters. Nor can they begin with a number, although numbers may be included elsewhere within the name.
Anyone have further info on allowed & non allowed Unicode chars for Swift Variables & Constants names. The restrictions seems a little like IDNA2008

This is initiative is big! Even the ASCII Anglo Saxons will have to switch on to Unicode

André 小山 Schappo

Last edited by andre; 4th June 2014 at 09:16 AM.. Reason: something went wrong
Reply With Quote
  #2 (permalink)  
Old 4th June 2014, 09:19 AM
Member
 
Join Date: May 2009
Location: England
Posts: 371
iTrader: (0)
Rep Power: 857
andre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished road
Re: Swift - Unicode Variables/Constants Names

Ah! The Emoji did not display correctly in the Quote
Reply With Quote
  #3 (permalink)  
Old 4th June 2014, 03:30 PM
Veteran
 
Join Date: Feb 2006
Posts: 7,495
iTrader: (65)
Rep Power: 2685
blastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enough
Re: Swift - Unicode Variables/Constants Names

Here we go: 🐶🐮

Tip: Convert to HTML entitites before posting in forum.
Reply With Quote
  #4 (permalink)  
Old 4th June 2014, 03:40 PM
Drewbert's Avatar
Administrator
 
Join Date: Feb 2006
Posts: 6,091
iTrader: (20)
Rep Power: 0
Drewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgy
Re: Swift - Unicode Variables/Constants Names

Quote:
Originally Posted by blastfromthepast View Post
Tip: Convert to HTML entitites before posting in forum.
Shouldn't need HTML entities. This forum is supposed to handle unicode natively.

My guess is whatever he cut & pasted it from screwed it up before it got sent from the browser to the forum server.
__________________
It's all jaded style to me.

Last edited by Drewbert; 4th June 2014 at 03:46 PM..
Reply With Quote
  #5 (permalink)  
Old 4th June 2014, 03:52 PM
Drewbert's Avatar
Administrator
 
Join Date: Feb 2006
Posts: 6,091
iTrader: (20)
Rep Power: 0
Drewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgy
Re: Swift - Unicode Variables/Constants Names

Trying to hunt down a truetype font that will display these

http://www.iemoji.com/view/emoji/192/nature/dog-face

http://en.wikipedia.org/wiki/Apple_Color_Emoji
__________________
It's all jaded style to me.

Last edited by Drewbert; 4th June 2014 at 03:56 PM..
Reply With Quote
  #6 (permalink)  
Old 4th June 2014, 04:03 PM
Veteran
 
Join Date: Feb 2006
Posts: 7,495
iTrader: (65)
Rep Power: 2685
blastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enough
Re: Swift - Unicode Variables/Constants Names

Quote:
Originally Posted by Drewbert View Post
Shouldn't need HTML entities. This forum is supposed to handle unicode natively.

My guess is whatever he cut & pasted it from screwed it up before it got sent from the browser to the forum server.
It is the database that might be screwing it up. Emoji are beyond the BMP and are coded as two surrogate pairs, which confounds some setups. Check the database and default character encoding.


The full details on database setup: http://mathiasbynens.be/notes/mysql-utf8mb4

Last edited by blastfromthepast; 4th June 2014 at 04:30 PM..
Reply With Quote
  #7 (permalink)  
Old 4th June 2014, 04:18 PM
Veteran
 
Join Date: Feb 2006
Posts: 7,495
iTrader: (65)
Rep Power: 2685
blastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enough
Re: Swift - Unicode Variables/Constants Names

Quote:
Originally Posted by Drewbert View Post
Trying to hunt down a truetype font that will display these
Symbola.ttf

http://users.teilar.gr/~g1951d/

Last edited by blastfromthepast; 4th June 2014 at 04:19 PM..
Reply With Quote
  #8 (permalink)  
Old 4th June 2014, 05:44 PM
Member
 
Join Date: May 2009
Location: England
Posts: 371
iTrader: (0)
Rep Power: 857
andre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished roadandre is on a distinguished road
Re: Swift - Unicode Variables/Constants Names

Quote:
Originally Posted by blastfromthepast View Post
It is the database that might be screwing it up. Emoji are beyond the BMP and are coded as two surrogate pairs, which confounds some setups. Check the database and default character encoding.


The full details on database setup: http://mathiasbynens.be/notes/mysql-utf8mb4
Which version of MySQL is this forum using? Any version less than 5.5 only has 3 byte utf8 and hence cannot handle chars outside of BMP http://dev.mysql.com/doc/refman/5.5/...t-unicode.html

André 小山 Schappo
Reply With Quote
  #9 (permalink)  
Old 4th June 2014, 06:53 PM
Ben Ben is offline
Senior Member
 
Join Date: Jan 2006
Posts: 1,410
iTrader: (33)
Rep Power: 2494
Ben has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura aboutBen has a spectacular aura about
Re: Swift - Unicode Variables/Constants Names

Unicode in programming languages ins't anything new. JavaScript for example supports Unicode variables/function names.
__________________
all my offers are valid for 48 hours unless posted otherwise
Reply With Quote
  #10 (permalink)  
Old 5th June 2014, 12:58 AM
Drewbert's Avatar
Administrator
 
Join Date: Feb 2006
Posts: 6,091
iTrader: (20)
Rep Power: 0
Drewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgy
Re: Swift - Unicode Variables/Constants Names

Standby 1, we'll work in the SQL problem.

Not urgent, it's hardly like you can register anything with these in it. :^)

Thanks for the pointers, Blast.
__________________
It's all jaded style to me.
Reply With Quote
  #11 (permalink)  
Old 5th June 2014, 04:34 AM
Veteran
 
Join Date: Feb 2006
Posts: 7,495
iTrader: (65)
Rep Power: 2685
blastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enough
Re: Swift - Unicode Variables/Constants Names

It could also be vbulletin that is at fault. In cases where the database writing fales, the non BMP data is lost completely, but in this case, we get some garbage characters.

Last edited by blastfromthepast; 5th June 2014 at 04:35 AM..
Reply With Quote
  #12 (permalink)  
Old 9th June 2014, 07:37 PM
Veteran
 
Join Date: Feb 2006
Posts: 7,495
iTrader: (65)
Rep Power: 2685
blastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enoughblastfromthepast will become famous soon enough
Re: Swift - Unicode Variables/Constants Names

😄

Last edited by blastfromthepast; 9th June 2014 at 07:38 PM..
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:59 PM.

Site Sponsors
Your ad here
buy t-shirt
מחיר הזהב

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright idnforums.com 2005

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54