Opened 12 years ago

Closed 12 years ago

#103 closed defect (fixed)

fix missing characters for ≥ and ≤

Reported by: Kevin Milner Owned by: Peter Powers
Priority: major Milestone: OpenSHA 1.2
Component: sha Version:
Keywords: Cc:

Description (last modified by Peter Powers)

currently greater/less than or equal to display as question marks (at least in Windows/Linux?). a cross platform fix should be implemented.

Fixed in [7412]

Change History (8)

comment:1 Changed 12 years ago by Kevin Milner

started in [7289] and [7290], but i'm not sure what character is missing in a couple instances. for example:

"Total M�5 Rate" in UCERF2...should that be ≤, ≥, or something else?

You can do a search for "�" in eclipse to find all instances.

comment:2 Changed 12 years ago by Ned Field

That example should be" ≥".

This must be an operating system difference problem?

Are we really going to be able to make it go away?

Perhaps we should write ">="

comment:3 Changed 12 years ago by Peter Powers

These symbols permeate both code and comments. People have probably been using whatever their systems character generator (e.g. Apple's Keyboard Viewer) to ill effect.

In comments that are ultimately interpreted as HTML, one needs to use ASCII codes (e.g. ≤). There are also numeric equivalents. See links below:

http://www.w3schools.com/tags/ref_ascii.asp
http://www.w3schools.com/tags/ref_symbols.asp

In Java Strings, special characters must be in Unicode, these include anything outside the standard arabic letters. The easiest way to find the correct symbol is to google 'unicode (name of symbol)'. The top link is usually a page that will show (somewhere) the Java/C encoding to use. For example, a lookup of 'Unicode less then equal' yields: \u2264

I think these should probably be fixed as encountered unless Kevin wants to go through everything. It may not always be clear what symbol was intended though.

comment:4 Changed 12 years ago by Kevin Milner

I think all of the old characters have been in there since before spring 2008, when the project (and thus eclipse) was using a non-standard file encoding (I think an apple one) as opposed to UTF-8.

Peter, if eclipse is set on the correct file encoding is it OK to just paste the symbols in there directly? That's what I did yesterday, and the characters work on both windows and linux at least.

comment:5 Changed 12 years ago by Peter Powers

You' re probably right for Java Strings so lets go with that and assume some ding-a-ling doesn't check-out, unknowingly convert, and then check back in files with the wrong encoding. I just did a test and a printLine returned a string of wierd characters as typed

JavaDoc? is another story. For whatever reason, the change to '<' in GaussianDistCalc? @param tagtook, but I tested other characters like ≤ and no dice. '<' as the tag opener in html should always be encoded in ascii.

comment:6 Changed 12 years ago by Kevin Milner

Not sure if this is related, but we've been getting some long winded warnings in our nightly builds about character mappings. I added the encoding="utf-8" flag to our javac ant tasks in [7347] to hopefully fix this issue.

comment:7 Changed 12 years ago by Kevin Milner

Milestone: OpenSHA 1.1OpenSHA 1.2

moving to 1.2

comment:8 Changed 12 years ago by Peter Powers

Description: modified (diff)
Resolution: fixed
Status: newclosed

Fixed all � (question mark inside a diamond) returned by search. Most were in comments and text strings; if more strange characters are encountered, open a new ticket or reopen this one with an example to search on.

Fixed in [7412]

Last edited 12 years ago by Peter Powers (previous) (diff)
Note: See TracTickets for help on using tickets.