ID:1379084
 
(See the best response by Super Saiyan X.)
How can I get the ♂ and ♀ symbols to recognize in an input/findtext() proc? I keep getting them replaced with question marks.
As shown here, the symbols you wish to use are not supported in BYOND's ASCII mode. You may just have to live without it, or make a feature request and sacrifice a virgin for good luck.
So there is absolutely no way to get those symbols into an output?
Well, I mean, you could bullshit the system and just make a .dmi with those symbols in it. If you were doing this, though, you might as well go the whole way and have everything be pulled from a .dmi.

If you really want to be strictly ASCII, try making a feature request for the ASCII standards to be updated.
I'm trying to take an input such as John ♂ (Level: 67) and detect the genders on it, so i can organize them into lists based off Male and Females. The lists would require the use of the gender symbols since they are taken off of a pre-determined site(Not in my control), and the lists themselves would need to contain these symbols. I'd be fine with the new lists containing M/F to represent genders, but the issue of seeing if the element is said gender with those signs.

Can you think of any possible work around?
May just want to use a blue M and a red F, just so it's differentiated from the name. Otherwise, no, I'm kinda at a loss. I'm just an artist.
In response to Xx305xX
Xx305xX wrote:
I'm trying to take an input such as John ♂ (Level: 67) and detect the genders on it, so i can organize them into lists based off Male and Females.

Are you trying to write code that will produce a list sorted by gender? If so then why not just store their gender in a variable? Or, if you really must do it by searching their name, then just put (M) or (F) before people's names, and use findtext() to search only the second character of the string.

EDIT: Wow, quoting those symbols made it blow up into more symbols!

EDIT2: AND AGAIN...every time I edit this post it GETS BIGGER
Well technically, if there is some way to include the font of an included .ttf (font file) as part of the stylesheet of an output, then you could actually get those symbols on there.

What you would do is make a font where some of the supported ASCII characters are replaced with whatever characters you want, then include that font in your game.

This isn't a very easy thing to do, and I really have no idea if you can actually use a font file as part of an output's style, so this may not even work. What I do know is that it works with maptext.
Considering my net cut out on the first time I tried to post this, this will be a short version.

@Vrocaan - I'd be fine using M/F for my output, but the input is out of my control considering it's taken from a webpage that I have no control over, since I do not own it. This is an organizing application for a list of characters used. So the problem is getting DM to recognize the symbols, not output them. Is that possible?

@Magicsofa - Same as above; so i'd need a way for findtext() to recognize the symbols. I don't need to output them though.

@Multiverse - It's being programmed as an application, not a game. Thus there is no map. I don't know how to include a font else i'd attempt the stylesheet option, but I'm not sure if that would work using findtext().
Well that's quite a tricky one :)

Maybe you could show us some code and the website in question? I bet there is a way to do what you want even if the symbols get messed up when you grab them from the site.
The code is just a simple findtext() to split things based on gender, then add them to a "Male" or "Female" list. Then after it's done it just creates a string variable and one by one adds the elements.

The element in question is a web based pokemon RPG. This is to organize people's boxes for trading. The boxes are formatted like this - it's below the roster and options. http://www.tppcrpg.net/profile.php?id=77888&View=All
To be honest what I would do is just have the ASCII symbols in a .dmi file.
Doohl, how would that help with recognizing the symbols in a findtext() proc with the taken input, at all?
To be fair, I was wondering why so many people keep answering on how you could get the gender symbols to output (which is what using other fonts, or creating icons, etc. would do), when it seems that your problem is that you need your game to recognize/parse them from an input.

But then if you read your first few posts in this thread (including the very first one), you actually asked about how to make it work for "output".

So that's thrown everyone off from the beginning.

You changed gears a little way in, but I fear that the damage has already been done...lol

But anyway, as for your actual issue, unmodified DM can't display the gender symbols, but maybe there's still hope that it could recognize their value? I'm definitely not qualified to answer this, though...
Yeah, I guess you were right on that. I need a way to recognize them. Not display them. I'll edit the OP and hopefully that will help out.
I think what would help out more is if we can see the website (sorry, I'm not registering an account...just give us a screenshot) and the code you have already written to try and accomplish this. I've never really used DM to get data from a website...are you doing that just fine? And if so, what do the symbols look like when you get them?
In response to Magicsofa
I'd like to add on to this. Is it really necessary to fetch data from this site? Can't you accomplish the same thing in DM with no need to use the said site?
I believe the entire point of his project is to work with data from the site. Sort of a "helper" program for the users of the site (from his description of what he's trying to do a couple of posts back)

And it also sounds like grabbing the data from the site is no problem (he's apparently already trying to work with said data)

The problem (which I myself am unable to directly address, as it exceeds my level of knowledge) is that said data includes gender information stored via the ascii gender symbols, ♂ and ♀.

He's trying to find a way for DM to recognize those symbols (probably via findtext()), so he can parse the character sheets of the players, and separate them via their gender.

But again, I'm not sure if it's possible, or how it would work...
It should be possible, as long as the gender symbols are received in a consistent manner. Maybe with text2ascii?
Best response
Y'know, if you're pulling the information from a website via Export(), I believe they are turned into ♂ and ♀ - which means you can easily compare them like that.

No text2ascii needed.
Page: 1 2