Comments on the charmap template before rollout can be left here. VanIsaacWScontribs 10:34, 15 June 2012 (UTC)
Unicode position and SGML/XML/HTML numeric character reference are redundant, even more so because you don’t use U+…
notation. It’s better to leave out the latter. People who use &#…;
and &#x…;
should know where the number comes from anyway.
Concerning the example, Cyrillic Che, I don’t know where you took the named character reference from, but it’s not in the HTML/XML/SGML list that the row header links to. Providing PUA locations also doesn’t make much sense, since font developers can allocate characters there anywhere they want, so you would at least have to provide a semi-standard body, such as MUFI. — Christoph Päper 11:51, 17 June 2012 (UTC)
I have rolled out this template at template:Charmap. This talk page has been moved and redirected to template talk:Charmap. I won't actually start converting any articles for a few days, but if anyone wants to use the template, it is live now, with the caveat that it might change slightly in functionality for a couple weeks. VanIsaacWScontribs 01:10, 22 June 2012 (UTC)
What's the use case for having up to 10 characters supported by this template? Aren't most uses of such tables comprised of two characters only (upper and lowercase)? --Waldir talk 15:22, 27 July 2012 (UTC)
I haven't tried anything that I couldn't pull off, but that's beside the point, especially since I've been working with templates for a while now. What I meant was that for casual users (and sometimes even for template developers, as exemplified in the next section), a simpler template would be much easier to understand and use. Its internal mechanism would be more straightforward and anyone editing it would be able to load its structure into working memory with less effort, since it would be shorter. For example, I believe you can agree that this is more intuitive:
{{charmap | uc_unicode = 0398 | uc_name = Greek Capital Letter Theta | lc_unicode = 3b8 | lc_name = Greek Small Letter Theta | lc_image = [[File:Greek lc theta.png|10px]] | map1 = [[ISO 8859-7]] | uc_map1 = c8 | lc_map1 = E8 | map2 = [[Code page 737|CP 737]] | lc_map2 = 87 | lc_map2 = 9F | map3 = [[Code page 860|CP 860]], [[Code page 861|861]], [[Code page 862|862]], [[Code page 863|863]], [[Code page 865|865]] | uc_map3 = E9 | namedref1 = [[TeX]] | lc_namedref1 = \theta }}
than this:
{{charmap | 0398 | name1 = Greek Capital Letter Theta | 3b8 | name2 = Greek Small Letter Theta | image2 = [[File:Greek lc theta.png|10px]] | map1 = [[ISO 8859-7]] | map1char1 = c8 | map1char2 = E8 | map2 = [[Code page 737|CP 737]] | map2char1 = 87 | map2char2 = 9F | map3 = [[Code page 860|CP 860]], [[Code page 861|861]], [[Code page 862|862]], [[Code page 863|863]], [[Code page 865|865]] | map3char1 = E9 | namedref1 = [[TeX]] | ref1char2 = \theta }}
(Note that I expanded the examples above to use one parameter per line, which might look more verbose than the example currently in the documentation, but the idea here is to demonstrate clarity of the parameter names, not of the whole template itself) I could even quote your own words: "if you can wade through all the nested brackets and pipes to parse the conditionals" and "it is a bit daunting when you see that wall of verticals". In fact, I'd go as far as to suggest the examples I give above aren't simplified enoug: we could have parameters for common charmaps rather than including all the links manually. Then we'd have something like
| uc_860_1_2_3_5 = E9
instead of
| map3 = [[Code page 860|CP 860]], [[Code page 861|861]], [[Code page 862|862]], [[Code page 863|863]], [[Code page 865|865]] | map3char1 = E9
And the links would be produced by the template itself. That makes using the template easier, and we could still have some generic |extramap1=
, |extramap2=
, etc for rarer maps that the template doesn't include natively. Additionally, if the links were to be changed (say, several code page articles merged into one) we would only have to fix the links in one place. --Waldir talk 09:46, 29 July 2012 (UTC)
{{uclcmap}}
- it can even just pass its arguments to this template. I would certainly be happy if you had any suggestions for making this version's naming scheme easier, but a lot of the world's scripts are uncased, so uc/lc only works for a small fraction of the possible usage cases. Heck, even regular Latin letters have superscript, subscript, and half-width forms that can be included. As for the "uc_860_1_2_3_5" suggestion, I don't even know how you would pull that off without bloating this guy into having thousands or even tens of thousands of conditionals. VanIsaacWScontribs 22:17, 29 July 2012 (UTC)|unicode=
as an alias for the [first] unnamed parameter should IMO still be done).
8859 =
and WinCP =
parameters, but we'd probably want to have a couple separate instantiations of each, seeing as some characters may have different encodings in different 8859 or Win code pages. VanIsaacWScontribs 22:56, 30 July 2012 (UTC)
The HTML/XML named character references are not the only ones out there - thanks for finding the automatic template for those, Waldir. I'm wondering if we shouldn't allow for others, like TEX. VanIsaacWScontribs 21:28, 27 July 2012 (UTC)
I'm actually running into a problem with the HTML named ref. I changed the example to greek theta, but the HTML ref isn't showing. Did you test to see if your code worked before? I gave it the code to build the table correctly if some characters don't have a named ref, but that really shouldn't effect anything - if it worked before, it should at least still show the encoding name. VanIsaacWScontribs 14:23, 28 July 2012 (UTC)
{{numcr2namecr}}
template - it's sending us to the else results, when given the theta code points, even though the template returns the proper Θ and θ results when I test it. If you have any thoughts, I'd be glad to hear them, otherwise, I'm going to take it to WP:WikiProject Templates. VanIsaacWScontribs 14:49, 28 July 2012 (UTC){{numcr2namecr}}
template isn't returning its values. VanIsaacWScontribs 10:56, 29 July 2012 (UTC)Yay!!! User:DePiep figured it out! the {{numcr2namecr}}
template doesn't sanitize inputs for whitespace. We're all good now. Thanks Waldir and DePiep for your help. VanIsaacWScontribs 21:51, 29 July 2012 (UTC)
Why is Unicode listed as an encoding? Unicode is not an encoding. Unicode can be implemented by different character encodings ([1]). Sclaes (talk) 19:14, 25 November 2014 (UTC) — Preceding unsigned comment added by Sclaes (talk • contribs) 23:25, 29 October 2014 (UTC)
It would be really good to be able to call Template:Script for the character display in this template's output. For example, if you look at Tsade#Character encodings, the Samaritan, Ugaritic, Imperial Aramaic and Phoenician characters to not display, but they can be rendered for many users:
It doesn't need to be automated — just being able to pass through an ISO 15924 code, like with {{script}}, would solve the issue. — OwenBlacker (Talk) 01:25, 11 December 2016 (UTC)
There's something broken! -- Polluks ★ 17:25, 16 May 2019 (UTC)
@GKFX: I am working on project to rebuild the templates that present information on category:Indic letters. I'd like to piggyback off of {{charmap}}
, but I have an issue that also presents an opportunity for the development of this template. Basically, with the Brahmi script and other early writing systems, Unicode encodings end up encompassing a superset of all the different eras and styles of an early writing system, and it can become necessary to show example glyphs from multiple styles to truly show a character and its encoding. This also presents an opportunity to extend the idea to modern scripts, where there are very often several quite distinctive writing styles that are legible to readers of a given language - e.g. modern Cyrillic has several letters with distinct cursive forms in different languages, or Fraktur and "Old English" styles of the Latin script are legible to modern German and English readers. What I'd like to do is introduce parameters to elicit a sub-table in the "Preview" cell in charmap that would allow for up to five different styles of each letter to be introduced.
Parameters and how they would be implemented in a cell of the subtable could be:
Parameter | Implementation | Extent |
---|---|---|
styleNlabel for N = 1, 2, 3, 4, 5 | ''{{{styleNlabel|}}}'' | for characters 1-10 |
styleN for N = 1-5 | <span style="{{{styleN|}}}">&#xnnnn;</span> |
for characters 1-10 |
styleX-Nlabel for X = 1-10 and N = 1-5 | Same as styleNlabel | for character X only |
styleX-N for X = 1-10 and N = 1-5 | Same as styleN | for character X only |
imageX-N for X = 1-10 and N = 1-5 | [[File:{{{imageX-N}}}]] |
for character X, style N |
A hardcoded example, showing just the top few rows. When embedding tables, the inside table has to use the <table>...</table>
, <tr>...</tr>
, and <td>...</td>
tags directly, instead of the standard wikimarkup for tables, so if you look at the wikicode, you can see how that's done.
Preview |
|
| ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Unicode name | brahmi letter gha | brahmi letter ka | ||||||||||||||
Encodings | decimal | hex | decimal | hex | ||||||||||||
Unicode | 69654 | U+11016 | 69651 | U+11013 |
{{charmap
| 11016
| 11013
| name1 = Brahmi letter Gha
| name2 = Brahmi letter Ka
| style1label = Ashoka
| style1-2label = Gujarat
| style2label = Kushan
| style3label = Gupta
| style1 = font-family:Noto Sans Brahmi; font-style:italic; font-size:24pt;
| image1-1 = [[File:Brah gh.svg]20px]
| image1-2 = [[File:Gupta gujarat gh.svg]20px]
| image1-3 = [[File:Gupta allahabad gh.svg]20px]
| image2-2 = [[File:Gupta ashoka k.svg]20px]
| image2-3 = [[File:Gupta allahabad k.svg]20px]
}}
Unfortunately, I am a template programmer, but I don't know lua at all. I've looked over the code for this module, but can't see how to implement something like this, so I will need help from you or somebody who knows how to program modules to get this off the ground. Much thanks for any help, VanIsaac, MPLL contWpWS 06:43, 1 October 2021 (UTC)
imageX-N
, where the user has specified a particular image for a character in a style, should be the first choice for being displayed. Next would be the character with styling specified for that character with styleX-N
. Ideally the character stylized with styleN
would be next, followed by imageX
, with unstyled plain text as the last resort. But if it's easier to program, it's probably fine for styleN
to be lumped in with the plain text as the last option. I hope this doesn't throw too much of a monkey wrench into the module logic structure, but let me know if there are good reasons why it is better to go with something else. It's actually looking really good, and thank you for all of your hard work! VanIsaac, MPLL contWpWS 21:21, 1 October 2021 (UTC)
StyleNlabel
or StyleX-Nlabel
. I personally think that the two CSS attributes should always apply if provided, as it can always be helpful to be able to just add some CSS, even potentially to an image, and there are enough parameters provided to control every character individually. On the subject of images, the priority order is currently ImageX-N
, ImageX
, styled character. I'm wondering if there is any point in allowing ImageX
to ever appear when splitting into multiple styles, as it makes far more sense to use ImageX-N
to actually put the image in the right place. User:GKFXtalk 13:44, 2 October 2021 (UTC)
imageX
to appear several times, with a few exceptions, but it might best to pop up an error message if you have both imageX
and imageX-N
with the same X
due to the likelihood that there's something amiss. |image2-3=[[File:Greek lc theta var.svg|15px]]
and |image2=[[File:Greek lc theta.png|10px]]
, but File:Greek lc theta.png shows up in all three styles, so that's what I was hoping to get fixed.I'm trying to use Charmap to tabulate codes for user-perceived characters. Several are not named sequences, so I would like the descriptive names I supply to appear as I supply them in |name1=
etc, for contrast with official names, for which uppercasing makes sense. {{charmap}} is upper casing them. How do I stop it uppercasing them? I've looked at the module code, but can't see where it is uppercasing them. I would favour having two levels of inhibition - inhibit all and inhibit a particular character. --RichardW57m (talk) 15:14, 29 October 2021 (UTC)
names[1 + #names] = frame:callParserFunction('uc', args['name' .. i])
, which you may be able to see is the normal {{uc}} parser function. If this is just for a couple of articles, you can defeat that with nowiki tags: |name1=<nowiki>This won't get uppercased.</nowiki>
. See Special:Permalink/1060161100 for a demo. If there are lots ping me and I can add a specific option. User:GKFXtalk 20:35, 13 December 2021 (UTC)
I feel that if deemed worthy of inclusion for completeness, deprecated, discouraged, obsolete and non-NFC encodings should be tagged within the table in some way, rather than having their status buried in the following text. But where can I add a footnote indicator? There are deprecated Tibetan vowels for Sanskrit, discouraged Khmer letters, obsolete Malayalam and Bengali false half-forms and reasonably common Vietnamese incomplete decompositions. --RichardW57m (talk) 15:33, 5 November 2021 (UTC)
{{charmap|41|name1=Latin letter A|42|name2=Latin letter B}}
into Special:ExpandTemplates and press OK, the "Result" box will contain the generated wikimarkup (should be fairly tidy) which you can edit to make a mockup. User:GKFXtalk 20:56, 13 December 2021 (UTC)
Preview | A | |
---|---|---|
Unicode name | LATIN LETTER A[α] | |
Encodings | decimal | hex |
Unicode | 65 | U+0041 |
UTF-8 | 65 | 41 |
Numeric character reference | A |
A |
Notes
@GKFX: That reduces the question to one of style and the chore of referencing the right part of the Unicode Standard. I'm not quite sure how I'd reference not being in form NFC - sometimes you have to execute the normalisation algorithm. --RichardW57m (talk) 13:14, 16 December 2021 (UTC)
Why does this template require Unicode character names to be manually input by a user? Template:Unichar automatically outputs the name of a character. This template should just do the same. 172.58.211.188 (talk) 00:07, 14 September 2024 (UTC)